mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
Merge remote-tracking branch 'remotes/origin/develop' into feature/auto-conversion-error
# Conflicts: # CHANGELOG.md
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
- nodejs: wopi formsubmit icon
|
||||||
- csharp-mvc: handling conversion -9 error
|
- csharp-mvc: handling conversion -9 error
|
||||||
- csharp: handling conversion -9 error
|
- csharp: handling conversion -9 error
|
||||||
- java-spring: handling conversion -9 error
|
- java-spring: handling conversion -9 error
|
||||||
|
|||||||
@ -996,12 +996,19 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
|||||||
const { userInfoGroups } = user;
|
const { userInfoGroups } = user;
|
||||||
|
|
||||||
const usersInfo = [];
|
const usersInfo = [];
|
||||||
|
const usersForProtect = [];
|
||||||
if (user.id !== 'uid-0') {
|
if (user.id !== 'uid-0') {
|
||||||
users.getAllUsers().forEach((userInfo) => {
|
users.getAllUsers().forEach((userInfo) => {
|
||||||
const u = userInfo;
|
const u = userInfo;
|
||||||
u.image = userInfo.avatar ? `${req.DocManager.getServerUrl()}/images/${userInfo.id}.png` : null;
|
u.image = userInfo.avatar ? `${req.DocManager.getServerUrl()}/images/${userInfo.id}.png` : null;
|
||||||
usersInfo.push(u);
|
usersInfo.push(u);
|
||||||
}, usersInfo);
|
}, usersInfo);
|
||||||
|
|
||||||
|
users.getUsersForProtect(user.id).forEach((userInfo) => {
|
||||||
|
const u = userInfo;
|
||||||
|
u.image = userInfo.avatar ? `${req.DocManager.getServerUrl()}/images/${userInfo.id}.png` : null;
|
||||||
|
usersForProtect.push(u);
|
||||||
|
}, usersForProtect);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileExt = fileUtility.getFileExtension(fileName);
|
fileExt = fileUtility.getFileExtension(fileName);
|
||||||
@ -1105,7 +1112,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
|||||||
directUrl: !userDirectUrl ? null : `${req.DocManager.getServerUrl()}/csv`,
|
directUrl: !userDirectUrl ? null : `${req.DocManager.getServerUrl()}/csv`,
|
||||||
},
|
},
|
||||||
usersForMentions: user.id !== 'uid-0' ? users.getUsersForMentions(user.id) : null,
|
usersForMentions: user.id !== 'uid-0' ? users.getUsersForMentions(user.id) : null,
|
||||||
usersForProtect: user.id !== 'uid-0' ? users.getUsersForProtect(user.id) : null,
|
usersForProtect,
|
||||||
usersInfo,
|
usersInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ DocManager.prototype.createDirectory = function createDirectory(directory) {
|
|||||||
|
|
||||||
// get the language from the request
|
// get the language from the request
|
||||||
DocManager.prototype.getLang = function getLang() {
|
DocManager.prototype.getLang = function getLang() {
|
||||||
if (/^[a-z]{2}(-[A-z]{4})?(-[A-Z]{2})?$/.test(this.req.query.lang)) {
|
if (/^[a-z]{2}(-[a-zA-z]{4})?(-[A-Z]{2})?$/.test(this.req.query.lang)) {
|
||||||
return this.req.query.lang;
|
return this.req.query.lang;
|
||||||
} // the default language value is English
|
} // the default language value is English
|
||||||
return 'en';
|
return 'en';
|
||||||
|
|||||||
@ -180,10 +180,7 @@ users.getUsersForProtect = function getUsersForProtect(id) {
|
|||||||
const result = [];
|
const result = [];
|
||||||
this.forEach((user) => {
|
this.forEach((user) => {
|
||||||
if (user.id !== id && user.name != null) {
|
if (user.id !== id && user.name != null) {
|
||||||
result.push({
|
result.push(user);
|
||||||
id: user.id,
|
|
||||||
name: user.name,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 16V13H7V11H5C4.44772 11 4 11.4477 4 12V17C4 17.5523 4.44772 18 5 18H19C19.5523 18 20 17.5523 20 17V12C20 11.4477 19.5523 11 19 11H17V13H18V16H6Z" fill="#444444"/>
|
||||||
|
<path d="M11 15H9V13L16 6H17V7H18V8L11 15Z" fill="#444444"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 379 B |
@ -8,73 +8,73 @@ GIT
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (7.0.8)
|
actioncable (7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (7.0.8)
|
actionmailbox (7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
activejob (= 7.0.8)
|
activejob (= 7.0.8.1)
|
||||||
activerecord (= 7.0.8)
|
activerecord (= 7.0.8.1)
|
||||||
activestorage (= 7.0.8)
|
activestorage (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
net-imap
|
net-imap
|
||||||
net-pop
|
net-pop
|
||||||
net-smtp
|
net-smtp
|
||||||
actionmailer (7.0.8)
|
actionmailer (7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
actionview (= 7.0.8)
|
actionview (= 7.0.8.1)
|
||||||
activejob (= 7.0.8)
|
activejob (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
net-imap
|
net-imap
|
||||||
net-pop
|
net-pop
|
||||||
net-smtp
|
net-smtp
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (7.0.8)
|
actionpack (7.0.8.1)
|
||||||
actionview (= 7.0.8)
|
actionview (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
rack (~> 2.0, >= 2.2.4)
|
rack (~> 2.0, >= 2.2.4)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (7.0.8)
|
actiontext (7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
activerecord (= 7.0.8)
|
activerecord (= 7.0.8.1)
|
||||||
activestorage (= 7.0.8)
|
activestorage (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
globalid (>= 0.6.0)
|
globalid (>= 0.6.0)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (7.0.8)
|
actionview (7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activejob (7.0.8)
|
activejob (7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.0.8)
|
activemodel (7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
activerecord (7.0.8)
|
activerecord (7.0.8.1)
|
||||||
activemodel (= 7.0.8)
|
activemodel (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
activestorage (7.0.8)
|
activestorage (7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
activejob (= 7.0.8)
|
activejob (= 7.0.8.1)
|
||||||
activerecord (= 7.0.8)
|
activerecord (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
mini_mime (>= 1.1.0)
|
mini_mime (>= 1.1.0)
|
||||||
activesupport (7.0.8)
|
activesupport (7.0.8.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
base64 (0.1.1)
|
base64 (0.2.0)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
byebug (11.1.3)
|
byebug (11.1.3)
|
||||||
@ -87,12 +87,12 @@ GEM
|
|||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.2.3)
|
concurrent-ruby (1.2.3)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
dalli (3.2.6)
|
dalli (3.2.8)
|
||||||
date (3.3.3)
|
date (3.3.4)
|
||||||
erubi (1.12.0)
|
erubi (1.12.0)
|
||||||
execjs (2.9.1)
|
execjs (2.9.1)
|
||||||
ffi (1.16.2)
|
ffi (1.16.3)
|
||||||
ffi (1.16.2-x64-mingw-ucrt)
|
ffi (1.16.3-x64-mingw-ucrt)
|
||||||
globalid (1.2.1)
|
globalid (1.2.1)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
i18n (1.14.1)
|
i18n (1.14.1)
|
||||||
@ -104,8 +104,9 @@ GEM
|
|||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (2.6.3)
|
json (2.7.1)
|
||||||
jwt (2.7.1)
|
jwt (2.8.0)
|
||||||
|
base64
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
loofah (2.22.0)
|
loofah (2.22.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
@ -121,30 +122,31 @@ GEM
|
|||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.22.2)
|
minitest (5.22.2)
|
||||||
net-imap (0.3.7)
|
net-imap (0.4.10)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
net-pop (0.1.2)
|
net-pop (0.1.2)
|
||||||
net-protocol
|
net-protocol
|
||||||
net-protocol (0.2.1)
|
net-protocol (0.2.2)
|
||||||
timeout
|
timeout
|
||||||
net-smtp (0.4.0)
|
net-smtp (0.4.0.1)
|
||||||
net-protocol
|
net-protocol
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nio4r (2.5.9)
|
nio4r (2.7.0)
|
||||||
nokogiri (1.16.2-arm64-darwin)
|
nokogiri (1.16.2-arm64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.16.2-x64-mingw-ucrt)
|
nokogiri (1.16.2-x64-mingw-ucrt)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.16.2-x86_64-linux)
|
nokogiri (1.16.2-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
parallel (1.23.0)
|
parallel (1.24.0)
|
||||||
parser (3.2.2.3)
|
parser (3.3.0.5)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
power_assert (2.0.3)
|
power_assert (2.0.3)
|
||||||
prettier_print (1.2.1)
|
prettier_print (1.2.1)
|
||||||
psych (5.1.0)
|
prism (0.24.0)
|
||||||
|
psych (5.1.2)
|
||||||
stringio
|
stringio
|
||||||
racc (1.7.3)
|
racc (1.7.3)
|
||||||
rack (2.2.8.1)
|
rack (2.2.8.1)
|
||||||
@ -152,20 +154,20 @@ GEM
|
|||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
rack-test (2.1.0)
|
rack-test (2.1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rails (7.0.8)
|
rails (7.0.8.1)
|
||||||
actioncable (= 7.0.8)
|
actioncable (= 7.0.8.1)
|
||||||
actionmailbox (= 7.0.8)
|
actionmailbox (= 7.0.8.1)
|
||||||
actionmailer (= 7.0.8)
|
actionmailer (= 7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
actiontext (= 7.0.8)
|
actiontext (= 7.0.8.1)
|
||||||
actionview (= 7.0.8)
|
actionview (= 7.0.8.1)
|
||||||
activejob (= 7.0.8)
|
activejob (= 7.0.8.1)
|
||||||
activemodel (= 7.0.8)
|
activemodel (= 7.0.8.1)
|
||||||
activerecord (= 7.0.8)
|
activerecord (= 7.0.8.1)
|
||||||
activestorage (= 7.0.8)
|
activestorage (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 7.0.8)
|
railties (= 7.0.8.1)
|
||||||
rails-dom-testing (2.2.0)
|
rails-dom-testing (2.2.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
minitest
|
minitest
|
||||||
@ -173,40 +175,40 @@ GEM
|
|||||||
rails-html-sanitizer (1.6.0)
|
rails-html-sanitizer (1.6.0)
|
||||||
loofah (~> 2.21)
|
loofah (~> 2.21)
|
||||||
nokogiri (~> 1.14)
|
nokogiri (~> 1.14)
|
||||||
railties (7.0.8)
|
railties (7.0.8.1)
|
||||||
actionpack (= 7.0.8)
|
actionpack (= 7.0.8.1)
|
||||||
activesupport (= 7.0.8)
|
activesupport (= 7.0.8.1)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
zeitwerk (~> 2.5)
|
zeitwerk (~> 2.5)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.1.0)
|
||||||
rbi (0.1.1)
|
rbi (0.1.9)
|
||||||
|
prism (>= 0.18.0, < 0.25)
|
||||||
sorbet-runtime (>= 0.5.9204)
|
sorbet-runtime (>= 0.5.9204)
|
||||||
yarp (>= 0.11.0)
|
rdoc (6.6.2)
|
||||||
rdoc (6.5.0)
|
|
||||||
psych (>= 4.0.0)
|
psych (>= 4.0.0)
|
||||||
regexp_parser (2.8.1)
|
regexp_parser (2.9.0)
|
||||||
rexml (3.2.6)
|
rexml (3.2.6)
|
||||||
rubocop (1.56.3)
|
rubocop (1.60.2)
|
||||||
base64 (~> 0.1.1)
|
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.2.2.3)
|
parser (>= 3.3.0.2)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.28.1, < 2.0)
|
rubocop-ast (>= 1.30.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.29.0)
|
rubocop-ast (1.30.0)
|
||||||
parser (>= 3.2.1.0)
|
parser (>= 3.2.1.0)
|
||||||
rubocop-rails (2.22.1)
|
rubocop-rails (2.23.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
|
rubocop-ast (>= 1.30.0, < 2.0)
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
sass-rails (6.0.0)
|
sass-rails (6.0.0)
|
||||||
sassc-rails (~> 2.1, >= 2.1.1)
|
sassc-rails (~> 2.1, >= 2.1.1)
|
||||||
@ -220,14 +222,14 @@ GEM
|
|||||||
tilt
|
tilt
|
||||||
sdoc (2.6.1)
|
sdoc (2.6.1)
|
||||||
rdoc (>= 5.0)
|
rdoc (>= 5.0)
|
||||||
sorbet (0.5.11048)
|
sorbet (0.5.11274)
|
||||||
sorbet-static (= 0.5.11048)
|
sorbet-static (= 0.5.11274)
|
||||||
sorbet-runtime (0.5.11048)
|
sorbet-runtime (0.5.11274)
|
||||||
sorbet-static (0.5.11048-universal-darwin)
|
sorbet-static (0.5.11274-universal-darwin)
|
||||||
sorbet-static (0.5.11048-x86_64-linux)
|
sorbet-static (0.5.11274-x86_64-linux)
|
||||||
sorbet-static-and-runtime (0.5.11048)
|
sorbet-static-and-runtime (0.5.11274)
|
||||||
sorbet (= 0.5.11048)
|
sorbet (= 0.5.11274)
|
||||||
sorbet-runtime (= 0.5.11048)
|
sorbet-runtime (= 0.5.11274)
|
||||||
spoom (1.2.4)
|
spoom (1.2.4)
|
||||||
erubi (>= 1.10.0)
|
erubi (>= 1.10.0)
|
||||||
sorbet-static-and-runtime (>= 0.5.10187)
|
sorbet-static-and-runtime (>= 0.5.10187)
|
||||||
@ -240,34 +242,34 @@ GEM
|
|||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
stringio (3.0.8)
|
stringio (3.1.0)
|
||||||
syntax_tree (6.2.0)
|
syntax_tree (6.2.0)
|
||||||
prettier_print (>= 1.2.0)
|
prettier_print (>= 1.2.0)
|
||||||
systemu (2.6.5)
|
systemu (2.6.5)
|
||||||
tapioca (0.11.9)
|
tapioca (0.11.17)
|
||||||
bundler (>= 2.2.25)
|
bundler (>= 2.2.25)
|
||||||
netrc (>= 0.11.0)
|
netrc (>= 0.11.0)
|
||||||
parallel (>= 1.21.0)
|
parallel (>= 1.21.0)
|
||||||
rbi (~> 0.1.0, >= 0.1.0)
|
rbi (>= 0.1.4, < 0.2)
|
||||||
sorbet-static-and-runtime (>= 0.5.10187)
|
sorbet-static-and-runtime (>= 0.5.10820)
|
||||||
spoom (~> 1.2.0, >= 1.2.0)
|
spoom (~> 1.2.0, >= 1.2.0)
|
||||||
thor (>= 1.2.0)
|
thor (>= 1.2.0)
|
||||||
yard-sorbet
|
yard-sorbet
|
||||||
test-unit (3.6.1)
|
test-unit (3.6.2)
|
||||||
power_assert
|
power_assert
|
||||||
thor (1.2.2)
|
thor (1.3.1)
|
||||||
tilt (2.3.0)
|
tilt (2.3.0)
|
||||||
timeout (0.4.0)
|
timeout (0.4.1)
|
||||||
turbolinks (5.2.1)
|
turbolinks (5.2.1)
|
||||||
turbolinks-source (~> 5.2)
|
turbolinks-source (~> 5.2)
|
||||||
turbolinks-source (5.2.0)
|
turbolinks-source (5.2.0)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
tzinfo-data (1.2023.3)
|
tzinfo-data (1.2024.1)
|
||||||
tzinfo (>= 1.0.0)
|
tzinfo (>= 1.0.0)
|
||||||
uglifier (4.2.0)
|
uglifier (4.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
unicode-display_width (2.4.2)
|
unicode-display_width (2.5.0)
|
||||||
uuid (2.3.9)
|
uuid (2.3.9)
|
||||||
macaddr (~> 1.0)
|
macaddr (~> 1.0)
|
||||||
web-console (4.2.1)
|
web-console (4.2.1)
|
||||||
@ -283,8 +285,7 @@ GEM
|
|||||||
yard-sorbet (0.8.1)
|
yard-sorbet (0.8.1)
|
||||||
sorbet-runtime (>= 0.5)
|
sorbet-runtime (>= 0.5)
|
||||||
yard (>= 0.9)
|
yard (>= 0.9)
|
||||||
yarp (0.12.0)
|
zeitwerk (2.6.13)
|
||||||
zeitwerk (2.6.12)
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
arm64-darwin-22
|
arm64-darwin-22
|
||||||
|
|||||||
@ -170,7 +170,7 @@ class HomeController < ApplicationController
|
|||||||
action_data: file_data['action_data'],
|
action_data: file_data['action_data'],
|
||||||
direct_url: file_data['direct_url']
|
direct_url: file_data['direct_url']
|
||||||
)
|
)
|
||||||
history = file.get_history
|
history = file.history
|
||||||
render(json: history)
|
render(json: history)
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
render(json: '{ "error": "File not found"}')
|
render(json: '{ "error": "File not found"}')
|
||||||
@ -343,7 +343,10 @@ class HomeController < ApplicationController
|
|||||||
# Save Copy as...
|
# Save Copy as...
|
||||||
def saveas
|
def saveas
|
||||||
body = JSON.parse(request.body.read)
|
body = JSON.parse(request.body.read)
|
||||||
file_url = body['url']
|
file_url = body['url'].sub(
|
||||||
|
HomeController.config_manager.document_server_public_uri.to_s,
|
||||||
|
HomeController.config_manager.document_server_private_uri.to_s
|
||||||
|
)
|
||||||
title = body['title']
|
title = body['title']
|
||||||
file_name = DocumentHelper.get_correct_name(title, nil)
|
file_name = DocumentHelper.get_correct_name(title, nil)
|
||||||
extension = File.extname(file_name).downcase
|
extension = File.extname(file_name).downcase
|
||||||
@ -378,7 +381,7 @@ class HomeController < ApplicationController
|
|||||||
render(plain: "{\"file\" : \"#{file_name}\"}")
|
render(plain: "{\"file\" : \"#{file_name}\"}")
|
||||||
nil
|
nil
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
render(plain: "{\"error\":1, \"message\": \"#{e.message}\"}")
|
render(plain: JSON.generate({ error: 1, message: e.message }))
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -262,8 +262,7 @@ class FileModel
|
|||||||
data_obj['url'] =
|
data_obj['url'] =
|
||||||
if i == cur_ver
|
if i == cur_ver
|
||||||
DocumentHelper.get_download_url(
|
DocumentHelper.get_download_url(
|
||||||
file_name,
|
file_name
|
||||||
true
|
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
DocumentHelper.get_historypath_uri(
|
DocumentHelper.get_historypath_uri(
|
||||||
@ -304,22 +303,20 @@ class FileModel
|
|||||||
|
|
||||||
prev = hist_data[(i - 2).to_s] # get the history data from the previous file version
|
prev = hist_data[(i - 2).to_s] # get the history data from the previous file version
|
||||||
# write key and url information about previous file version with optional direct url
|
# write key and url information about previous file version with optional direct url
|
||||||
data(
|
data_obj['previous'] = if enable_direct_url? == true
|
||||||
obj['previous'] = if enable_direct_url? == true
|
{ # write key and url information about previous file version with optional directUrl
|
||||||
{ # write key and url information about previous file version with optional directUrl
|
fileType: prev['fileType'],
|
||||||
fileType: prev['fileType'],
|
key: prev['key'],
|
||||||
key: prev['key'],
|
url: prev['url'],
|
||||||
url: prev['url'],
|
directUrl: prev['directUrl']
|
||||||
directUrl: prev['directUrl']
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
fileType: prev['fileType'],
|
||||||
fileType: prev['fileType'],
|
key: prev['key'],
|
||||||
key: prev['key'],
|
url: prev['url']
|
||||||
url: prev['url']
|
}
|
||||||
}
|
end
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
diff_path = [hist_dir, (i - 1).to_s, 'diff.zip'].join(File::SEPARATOR)
|
diff_path = [hist_dir, (i - 1).to_s, 'diff.zip'].join(File::SEPARATOR)
|
||||||
if File.exist?(diff_path)
|
if File.exist?(diff_path)
|
||||||
|
|||||||
@ -167,7 +167,13 @@ class ServiceConverter
|
|||||||
|
|
||||||
percent_element = file_result['percent'] # get the percentage value
|
percent_element = file_result['percent'] # get the percentage value
|
||||||
|
|
||||||
result_percent = Integer(percent_element, 10) unless percent_element.nil?
|
result_percent = unless percent_element.nil?
|
||||||
|
if percent_element.is_a?(String)
|
||||||
|
Integer(percent_element, 10)
|
||||||
|
else
|
||||||
|
Integer(percent_element)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
result_percent = 99 if result_percent >= 100
|
result_percent = 99 if result_percent >= 100
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ events {
|
|||||||
|
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|||||||
Reference in New Issue
Block a user