Compare commits

..

48 Commits

Author SHA1 Message Date
44ad9ad1ee master branch only 2024-11-21 13:26:00 +03:00
e97c8a8393 actions for go 2024-11-21 13:23:19 +03:00
78fe9e02ce Merge pull request 'release/v1.11.0' from release/v1.11.0 into master
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/16
2024-10-31 13:49:25 +00:00
8e260dec56 nodejs: fix lint (b36bfdec4d) 2024-10-31 16:45:37 +03:00
3010db6bec Merge pull request 'build: update documentserver version to 8.2 in docker-compose files' from documentserver-version into release/v1.11.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/14
2024-10-28 10:11:33 +00:00
9f922ccdbe build: update documentserver version to 8.2 in docker-compose files 2024-10-28 13:10:46 +03:00
cb8b4d1681 fix(nodejs): replace localhost in unsupported converted file url. Fix Bug 70551 (c4d80f6b5e) 2024-10-21 14:09:42 +03:00
decb722cf9 1.11.0 2024-10-20 17:08:13 +03:00
d7d31bd6b7 fix changelog 2024-10-16 11:56:16 +03:00
e4f5f0bca7 submit not for viewer
This reverts commit 35cf2fb0b0.
2024-10-15 18:06:37 +03:00
8714cc3d69 Revert "nodejs: comment only is not for pdf"
This reverts commit 146d26c868.
2024-10-14 12:08:22 +03:00
f1c5be0401 Merge remote-tracking branch 'remotes/origin/master' into release/v8.2.0 2024-10-11 12:33:49 +03:00
d68860f025 Merge pull request 'release/v1.10.0 from release/v1.10.0 into master
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/9
2024-10-11 09:27:13 +00:00
fdd90fd851 python: fix lint 2024-10-11 12:20:12 +03:00
abb7f6e893 Merge remote-tracking branch 'remotes/origin/release/v1.10.0' into release/v8.2.0 2024-10-10 13:47:38 +03:00
89c60280ba php-laravel: lint 2024-10-10 13:40:12 +03:00
8522e08670 php-laravel: lint 2024-10-10 13:29:10 +03:00
52b792f3a2 Merge pull request 'fix(java-spring): error saving non-existent file. Fix Bug 70788' from fix-java-spring-forgotten into release/v1.10.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/8
2024-10-10 10:18:41 +00:00
05f7fa2b84 fix(java-spring): error saving non-existent file. Fix Bug 70788 2024-10-10 17:11:48 +07:00
06c3dc1446 Merge remote-tracking branch 'remotes/origin/release/v1.10.0' into release/v8.2.0 2024-10-08 12:54:10 +03:00
b751d44a51 Merge pull request '1.10.0-bugfix' (#5) from 1.10.0-bugfix into release/v1.10.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/5
2024-10-08 09:52:38 +00:00
35cf2fb0b0 submit for all modes 2024-10-07 14:54:16 +03:00
25ec76084f coauthoring/CommandService.ashx address replaced with command 2024-10-07 11:35:55 +03:00
c72218d3ae ConvertService.ashx address replaced with converter 2024-10-07 11:34:22 +03:00
17458ec5b3 fix(java-spring): сut out directUrl. Fix Bug 70571 2024-10-07 14:42:24 +07:00
c4d80f6b5e fix(nodejs): replace localhost in unsupported converted file url. Fix Bug 70551 2024-10-03 15:15:42 +07:00
50bbd86cf5 Merge branch 'release/v1.10.0' into release/v8.2.0 2024-09-30 12:52:43 +03:00
2b0b902f9c using default empty files (For Bug 70101) 2024-09-30 12:50:09 +03:00
b36bfdec4d fix(nodejs): fix maxfilesize issue on upload (Fix Bug 70516) 2024-09-27 14:25:21 +03:00
97b70cceb5 Merge branch 'release/v1.10.0' into release/v8.2.0 2024-09-24 15:07:22 +03:00
596d445439 revert empty files (For Bug 70101) 2024-09-24 15:06:16 +03:00
4943adc21a nodejs: WOPI rename 2024-09-24 14:37:32 +03:00
db3ccd7482 Revert "nodejs: filling by default if possible" (Fix Bug 70284)
This reverts commit 15e09fece2.

# Conflicts:
#	web/documentserver-example/nodejs/app.js
2024-09-24 12:06:41 +03:00
4c7ea51207 Merge remote-tracking branch 'remotes/origin/release/v1.10.0' into release/v8.2.0 2024-09-24 12:02:52 +03:00
4f8f7399bb Merge pull request 'bugfix-1.10.0' (#3) from bugfix-1.10.0 into release/v1.10.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/3
2024-09-24 09:02:19 +00:00
581f2aaef6 he-IL skin language 2024-09-23 10:51:25 +03:00
62f98954b4 fix(python): exclude nochanges(4) error in command service request 2024-09-20 18:10:53 +07:00
819faf84f1 fix(ruby): exclude nochanges(4) error in command service request. Fix Bug 69913 2024-09-20 18:03:38 +07:00
66cf2aca8c Merge remote-tracking branch 'remotes/origin/release/v1.10.0' into bugfix-1.10.0
# Conflicts:
#	web/documentserver-example/csharp-mvc/Scripts/jscript.js
#	web/documentserver-example/csharp/script/jscript.js
#	web/documentserver-example/python/static/js/jscript.js
2024-09-20 09:57:35 +03:00
73b727ff9f Merge pull request 'fix: add file existence check before save. Fix Bug 69948' (#2) from fix/java-check-file-exist into release/v1.10.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/2
2024-09-18 08:55:32 +00:00
dcc5a8f56d build(java-spring): update SDK dependency. Fix Bug 69951 2024-09-18 15:38:34 +07:00
14df5fcfa0 fix: add file existence check before save 2024-09-17 14:17:00 +03:00
e2e8087800 fix(python): extension without dot in conversion script. Fix Bug 69931 2024-09-16 15:59:12 +07:00
4c6e6dc235 fix(java): not blank page goback for uid-2. Fix Bug 69945 2024-09-13 16:31:05 +07:00
cd4ff5e045 fix(php): replacing localhost in saveas file url. Fix Bug 69936 2024-09-13 14:16:58 +07:00
e25b10d618 fix(csharp-mvc): extension without dot in conversion script. Fix Bug 70022 2024-09-12 14:03:49 +07:00
f00abbc9e7 fix(csharp): extension without dot in conversion script. Fix Bug 70022 2024-09-12 14:03:15 +07:00
63237f52ca fix(csharp): forgotten pdf logo. Fix Bug 70023 2024-09-11 16:13:46 +07:00
71 changed files with 298 additions and 214 deletions

32
.github/workflows/artifact-go.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Artifact Golang
on:
workflow_dispatch:
push:
branches: [master]
paths: ['web/documentserver-example/go/**']
pull_request:
branches: [master]
paths: ['web/documentserver-example/go/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
cd ./web/documentserver-example/go
mkdir -p ./deploy/'Go Example'
rsync -av --exclude='deploy' ./ ./deploy/'Go Example'
rm -rf ./deploy/'Go Example'/static/assets/document-formats/.git
rm -rf ./deploy/'Go Example'/static/assets/document-templates/.git
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Go.Example
path: ${{ github.workspace }}/web/documentserver-example/go/deploy

View File

@ -0,0 +1,31 @@
name: Artifact PHP Laravel
on:
workflow_dispatch:
push:
branches: [master]
paths: ['web/documentserver-example/php-laravel/**']
pull_request:
branches: [master]
paths: ['web/documentserver-example/php-laravel/**']
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Artifact
run: |
cd ${{ github.workspace }}
git submodule update --init --recursive
cd ./web/documentserver-example/php-laravel
mkdir -p ./deploy/'PHP Laravel Example'
rsync -av --exclude='deploy' ./ ./deploy/'PHP Laravel Example'
rm -rf ./deploy/'PHP Laravel Example'/public/assets/document-formats/.git
rm -rf ./deploy/'PHP Laravel Example'/public/assets/document-templates/.git
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: PHP-Laravel.Example
path: ${{ github.workspace }}/web/documentserver-example/php-laravel/deploy

29
.github/workflows/lint-go.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Golangci
on:
workflow_dispatch:
push:
branches: [master]
paths: ['web/documentserver-example/go/**']
pull_request:
branches: [master, develop]
paths: ['web/documentserver-example/go/**']
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/documentserver-example/go
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Lint Golangci
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run

View File

@ -3,10 +3,10 @@ name: Lint Java
on:
workflow_dispatch:
push:
branches: [master, main]
branches: [master]
paths: ['web/documentserver-example/java/**']
pull_request:
branches: [master, main, develop]
branches: [master, develop]
paths: ['web/documentserver-example/java/**']
jobs:

View File

@ -3,10 +3,10 @@ name: ESLint
on:
workflow_dispatch:
push:
branches: [master, main]
branches: [master]
paths: ['web/documentserver-example/nodejs/**']
pull_request:
branches: [master, main, develop]
branches: [master, develop]
paths: ['web/documentserver-example/nodejs/**']
env:

37
.github/workflows/lint-php-laravel.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Laravel Pint
on:
workflow_dispatch:
push:
branches: [master]
paths: ['web/documentserver-example/php-laravel/**']
pull_request:
branches: [master, develop]
paths: ['web/documentserver-example/php-laravel/**']
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2]
defaults:
run:
working-directory: ./web/documentserver-example/php-laravel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, dom, curl, libxml, mbstring
coverage: none
- name: Install Pint
run: composer global require laravel/pint
- name: Run Pint
run: pint --test

View File

@ -3,10 +3,10 @@ name: PHPCs
on:
workflow_dispatch:
push:
branches: [master, main]
branches: [master]
paths: ['web/documentserver-example/php/**']
pull_request:
branches: [master, main, develop]
branches: [master, develop]
paths: ['web/documentserver-example/php/**']
jobs:

View File

@ -3,10 +3,10 @@ name: PyLint
on:
workflow_dispatch:
push:
branches: [master, main]
branches: [master]
paths: ['web/documentserver-example/python/**']
pull_request:
branches: [master, main, develop]
branches: [master, develop]
paths: ['web/documentserver-example/python/**']
jobs:

View File

@ -3,10 +3,10 @@ name: Rubocop
on:
workflow_dispatch:
push:
branches: [master, main]
branches: [master]
paths: ['web/documentserver-example/ruby/**']
pull_request:
branches: [master, main, develop]
branches: [master, develop]
paths: ['web/documentserver-example/ruby/**']
jobs:

View File

@ -3,10 +3,10 @@ name: Lint Spring
on:
workflow_dispatch:
push:
branches: [master, main]
branches: [master]
paths: ['web/documentserver-example/java-spring/**']
pull_request:
branches: [master, main, develop]
branches: [master, develop]
paths: ['web/documentserver-example/java-spring/**']
jobs:

View File

@ -2,7 +2,7 @@ name: Release
on:
push:
branches: [master,main]
branches: [master]
permissions:
contents: write

16
.gitmodules vendored
View File

@ -1,21 +1,21 @@
[submodule "web/documentserver-example/nodejs/public/assets/document-templates"]
path = web/documentserver-example/nodejs/public/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/nodejs/public/assets/document-formats"]
path = web/documentserver-example/nodejs/public/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats
[submodule "web/documentserver-example/csharp-mvc/assets/document-templates"]
path = web/documentserver-example/csharp-mvc/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/csharp-mvc/assets/document-formats"]
path = web/documentserver-example/csharp-mvc/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats
[submodule "web/documentserver-example/php/assets/document-templates"]
path = web/documentserver-example/php/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/php/assets/document-formats"]
path = web/documentserver-example/php/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats
@ -23,19 +23,19 @@
[submodule "web/documentserver-example/python/assets/document-templates"]
path = web/documentserver-example/python/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/java/src/main/resources/assets/document-templates"]
path = web/documentserver-example/java/src/main/resources/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/ruby/assets/document-templates"]
path = web/documentserver-example/ruby/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/java-spring/src/main/resources/assets/document-templates"]
path = web/documentserver-example/java-spring/src/main/resources/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/python/assets/document-formats"]
path = web/documentserver-example/python/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats
@ -51,7 +51,7 @@
[submodule "web/documentserver-example/csharp/assets/document-templates"]
path = web/documentserver-example/csharp/assets/document-templates
url = https://github.com/ONLYOFFICE/document-templates
branch = main/en
branch = main/default
[submodule "web/documentserver-example/csharp/assets/document-formats"]
path = web/documentserver-example/csharp/assets/document-formats
url = https://github.com/ONLYOFFICE/document-formats

View File

@ -1,5 +1,11 @@
# Change Log
## 1.11.0
- he-IL skin language
- ConvertService.ashx address replaced with converter
- coauthoring/CommandService.ashx address replaced with command
- without submitForm in viewer
## 1.10.0
- nodejs: converting function on index page
- java-spring: using java docs-integration-sdk

View File

@ -225,7 +225,7 @@ namespace OnlineEditorsExampleMVC.Helpers
private static void ProcessResponseError(int errorCode)
{
var errorMessage = string.Empty;
const string errorMessageTemplate = "Error occurred in the ConvertService.ashx: {0}";
const string errorMessageTemplate = "Error occurred in the ConvertService: {0}";
switch (errorCode)
{

View File

@ -89,7 +89,7 @@ namespace OnlineEditorsExampleMVC.Models
editorsMode = "fillForms";
canEdit = true;
}
var submitForm = (editorsMode.Equals("fillForms") || editorsMode.Equals("embedded")) && user.id.Equals("uid-1"); // check if the Submit form button is displayed or not
var submitForm = !editorsMode.Equals("view") && user.id.Equals("uid-1"); // check if the Submit form button is displayed or not
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // set the mode parameter: change it to view if the document can't be edited
// favorite icon state

View File

@ -109,7 +109,7 @@ if (typeof jQuery != "undefined") {
var timer = null;
var checkConvert = function (filePass, fileType) {
filePass = filePass ? filePass : null;
filePass = filePass ? filePass : null;
if (timer != null) {
clearTimeout(timer);
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<appSettings>
<clear />
<add key="version" value="1.10.0"/>
<add key="version" value="1.11.0"/>
<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
@ -16,14 +16,14 @@
<add key="files.docservice.verify-peer-off" value="true"/>
<add key="files.docservice.languages" value="en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language"/>
<add key="files.docservice.languages" value="en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language"/>
<add key="files.docservice.url.site" value="http://documentserver/"/>
<add key="files.docservice.url.converter" value="ConvertService.ashx"/>
<add key="files.docservice.url.converter" value="converter"/>
<add key="files.docservice.url.api" value="web-apps/apps/api/documents/api.js"/>
<add key="files.docservice.url.preloader" value="web-apps/apps/api/documents/cache-scripts.html"/>
<add key="files.docservice.url.command" value="coauthoring/CommandService.ashx"/>
<add key="files.docservice.url.command" value="command"/>
<add key="files.docservice.url.example" value=""/>

View File

@ -154,7 +154,7 @@ namespace OnlineEditorsExample
editorsMode = "fillForms";
canEdit = true;
}
var submitForm = (editorsMode.Equals("fillForms") || editorsMode.Equals("embedded")) && user.id.Equals("uid-1"); // check if the Submit form button is displayed or hidden
var submitForm = !editorsMode.Equals("view") && user.id.Equals("uid-1"); // check if the Submit form button is displayed or hidden
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // get the editor opening mode (edit or view)
var jss = new JavaScriptSerializer();

View File

@ -227,7 +227,7 @@ namespace ASC.Api.DocumentConverter
private static void ProcessResponseError(int errorCode)
{
var errorMessage = string.Empty;
const string errorMessageTemplate = "Error occurred in the ConvertService.ashx: {0}";
const string errorMessageTemplate = "Error occurred in the ConvertService: {0}";
switch (errorCode)
{

View File

@ -46,6 +46,7 @@ namespace OnlineEditorsExample
{
var ext = Path.GetExtension(fileName).ToLower();
if (FormatManager.PdfExtensions().Contains(ext)) return "pdf"; // pdf for pdf extensions
if (FormatManager.DocumentExtensions().Contains(ext)) return "word"; // word for text document extensions
if (FormatManager.SpreadsheetExtensions().Contains(ext)) return "cell"; // cell for spreadsheet extensions
if (FormatManager.PresentationExtensions().Contains(ext)) return "slide"; // slide for presentation extensions

View File

@ -109,7 +109,7 @@ if (typeof jQuery != "undefined") {
var timer = null;
var checkConvert = function (filePass, fileType) {
filePass = filePass ? filePass : null;
filePass = filePass ? filePass : null;
if (timer != null) {
clearTimeout(timer);
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<clear />
<add key="version" value="1.10.0"/>
<add key="version" value="1.11.0"/>
<add key="filesize-max" value="52428800"/>
<add key="storage-path" value=""/>
@ -15,14 +15,14 @@
<add key="files.docservice.token.useforrequest" value="true" />
<add key="files.docservice.languages" value="en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.languages" value="en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA: Test Language"/>
<add key="files.docservice.url.site" value="http://documentserver/"/>
<add key="files.docservice.url.converter" value="ConvertService.ashx"/>
<add key="files.docservice.url.converter" value="converter"/>
<add key="files.docservice.url.api" value="web-apps/apps/api/documents/api.js"/>
<add key="files.docservice.url.preloader" value="web-apps/apps/api/documents/cache-scripts.html"/>
<add key="files.docservice.url.command" value="coauthoring/CommandService.ashx"/>
<add key="files.docservice.url.command" value="command"/>
<add key="files.docservice.url.example" value=""/>

View File

@ -84,7 +84,7 @@
<dependency>
<groupId>com.onlyoffice</groupId>
<artifactId>docs-integration-sdk</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@ -33,7 +33,6 @@ import com.onlyoffice.manager.security.JwtManager;
import com.onlyoffice.manager.settings.SettingsManager;
import com.onlyoffice.model.documenteditor.Config;
import com.onlyoffice.model.documenteditor.config.document.Type;
import com.onlyoffice.model.settings.SettingsConstants;
import lombok.SneakyThrows;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -89,8 +88,6 @@ public class EditorController {
@RequestParam(value = "action", required = false) final String actionParam,
@RequestParam(value = "type", required = false) final String typeParam,
@RequestParam(value = "actionLink", required = false) final String actionLink,
@RequestParam(value = "directUrl", required = false,
defaultValue = "false") final Boolean directUrl,
@CookieValue(value = "uid") final String uid,
@CookieValue(value = "ulang") final String lang,
final Model model) throws JsonProcessingException {
@ -105,8 +102,6 @@ public class EditorController {
type = Type.valueOf(typeParam.toUpperCase());
}
settingsManager.setSetting(SettingsConstants.DIRECT_URL, String.valueOf(directUrl));
List<String> langsAndKeys = Arrays.asList(langs.split("\\|"));
for (String langAndKey : langsAndKeys) {
String[] couple = langAndKey.split(":");
@ -144,13 +139,13 @@ public class EditorController {
model.addAttribute("docserviceApiUrl", urlManager.getDocumentServerApiUrl());
// get an image and add it to the model
model.addAttribute("dataInsertImage", getInsertImage(directUrl));
model.addAttribute("dataInsertImage", getInsertImage());
// get a document for comparison and add it to the model
model.addAttribute("dataDocument", getCompareFile(directUrl));
model.addAttribute("dataDocument", getCompareFile());
// get recipients data for mail merging and add it to the model
model.addAttribute("dataSpreadsheet", getSpreadsheet(directUrl));
model.addAttribute("dataSpreadsheet", getSpreadsheet());
// get user data for mentions and add it to the model
model.addAttribute("usersForMentions", getUserMentions(uid));
@ -210,14 +205,10 @@ public class EditorController {
@SneakyThrows
private String getInsertImage(final Boolean directUrl) { // get an image that will be inserted into the document
private String getInsertImage() { // get an image that will be inserted into the document
Map<String, Object> dataInsertImage = new HashMap<>();
dataInsertImage.put("fileType", "svg");
dataInsertImage.put("url", storagePathBuilder.getServerUrl(true) + "/css/img/logo.svg");
if (directUrl) {
dataInsertImage.put("directUrl", storagePathBuilder
.getServerUrl(false) + "/css/img/logo.svg");
}
// check if the document token is enabled
if (settingsManager.isSecurityEnabled()) {
@ -232,14 +223,10 @@ public class EditorController {
// get a document that will be compared with the current document
@SneakyThrows
private String getCompareFile(final Boolean directUrl) {
private String getCompareFile() {
Map<String, Object> dataDocument = new HashMap<>();
dataDocument.put("fileType", "docx");
dataDocument.put("url", storagePathBuilder.getServerUrl(true) + "/assets?name=sample.docx");
if (directUrl) {
dataDocument.put("directUrl", storagePathBuilder
.getServerUrl(false) + "/assets?name=sample.docx");
}
// check if the document token is enabled
if (settingsManager.isSecurityEnabled()) {
@ -252,13 +239,10 @@ public class EditorController {
}
@SneakyThrows
private String getSpreadsheet(final Boolean directUrl) {
private String getSpreadsheet() {
Map<String, Object> dataSpreadsheet = new HashMap<>(); // get recipients data for mail merging
dataSpreadsheet.put("fileType", "csv");
dataSpreadsheet.put("url", storagePathBuilder.getServerUrl(true) + "/csv");
if (directUrl) {
dataSpreadsheet.put("directUrl", storagePathBuilder.getServerUrl(false) + "/csv");
}
// check if the document token is enabled
if (settingsManager.isSecurityEnabled()) {

View File

@ -436,8 +436,11 @@ public class FileController {
callbackService.processCallback(callback, fileName);
} catch (Exception e) {
e.printStackTrace();
return e.getMessage();
String message = e.getMessage();
if (!message.contains("\"error\":1")) {
e.printStackTrace();
}
return message;
}
return "{\"error\":\"0\"}";
@ -525,7 +528,6 @@ public class FileController {
if (!link.contains(storagePathBuilder.getServerUrl(true))) {
HashMap<String, String> data = new HashMap<>();
data.put("url", link);
data.put("directUrl", link);
return gson.toJson(data);
}
@ -571,7 +573,6 @@ public class FileController {
+ new File(storagePathBuilder.getFileLocation(fileName)).lastModified()
));
data.put("url", urlManager.getFileUrl(fileName));
data.put("directUrl", body.getDirectUrl() ? urlManager.getDirectFileUrl(fileName) : null);
data.put("referenceData", referenceData);
data.put("path", fileName);
data.put("link", storagePathBuilder.getServerUrl(true) + "/editor?fileName=" + fileName);
@ -596,9 +597,8 @@ public class FileController {
@GetMapping("/historydata")
@ResponseBody
public String history(@RequestParam("fileName") final String fileName,
@RequestParam("version") final String version,
@RequestParam(value = "directUrl", defaultValue = "false") final Boolean directUrl) {
return historyManager.getHistoryData(fileName, version, directUrl);
@RequestParam("version") final String version) {
return historyManager.getHistoryData(fileName, version);
}
@PutMapping("/restore")

View File

@ -33,7 +33,6 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.http.ResponseEntity;
@ -83,8 +82,7 @@ public class IndexController {
private String enableForgotten;
@GetMapping("${url.index}")
public String index(@RequestParam(value = "directUrl", required = false) final Boolean directUrl,
final Model model) {
public String index(final Model model) {
java.io.File[] files = storageMutator.getStoredFiles(); // get all the stored files from the storage
List<String> docTypes = new ArrayList<>();
List<Boolean> filesEditable = new ArrayList<>();
@ -128,7 +126,6 @@ public class IndexController {
model.addAttribute("tooltip", tooltip);
model.addAttribute("users", users);
model.addAttribute("languages", languages);
model.addAttribute("directUrl", directUrl);
model.addAttribute("serverVersion", serverVersion);
model.addAttribute("enableForgotten", Boolean.valueOf(enableForgotten));

View File

@ -135,6 +135,11 @@ public class DefaultCallbackManager implements CallbackManager {
String curExt = documentManager.getExtension(fileName); // get current file extension
String downloadExt = callback.getFiletype(); // get an extension of the downloaded file
String storagePath = storagePathBuilder.getFileLocation(newFileName); // get the path to a new file
if (!Paths.get(storagePath).toFile().exists()) {
throw new RuntimeException("{\"error\":1, \"message\":\"file does not exist\"}");
}
downloadUri = urlManager.replaceToInnerDocumentServerUrl(downloadUri);
changesUri = urlManager.replaceToInnerDocumentServerUrl(changesUri);
@ -170,7 +175,6 @@ public class DefaultCallbackManager implements CallbackManager {
byte[] byteArrayFile = getDownloadFile(downloadUri); // download document file
String storagePath = storagePathBuilder.getFileLocation(newFileName); // get the path to a new file
Path lastVersion = Paths.get(storagePathBuilder
.getFileLocation(fileName)); // get the path to the last file version

View File

@ -147,7 +147,7 @@ public class DefaultHistoryManager implements HistoryManager {
// todo: Refactoring
@SneakyThrows
public String getHistoryData(final String fileName, final String version, final Boolean directUrl) {
public String getHistoryData(final String fileName, final String version) {
// get history directory
String histDir = storagePathBuilder.getHistoryDir(storagePathBuilder.getFileLocation(fileName));
Integer curVer = storagePathBuilder.getFileVersion(histDir, false); // get current file version
@ -175,13 +175,6 @@ public class DefaultHistoryManager implements HistoryManager {
.getExtension(fileName), true))
.build();
if (directUrl) {
historyData.setDirectUrl(i == curVer
? urlManager.getDirectFileUrl(fileName)
: urlManager.getHistoryFileUrl(fileName, i, "prev" + documentManager
.getExtension(fileName), false)
);
}
historyData.setVersion(String.valueOf(i));
if (i > 1) { //check if the version number is greater than 1
@ -193,9 +186,6 @@ public class DefaultHistoryManager implements HistoryManager {
.key(historyDataPrev.getKey())
.url(historyDataPrev.getUrl())
.build();
if (directUrl) {
previous.setDirectUrl(historyDataPrev.getDirectUrl());
}
// write information about previous file version to the data object
historyData.setPrevious(previous);

View File

@ -21,6 +21,6 @@ package com.onlyoffice.integration.documentserver.managers.history;
// specify the history manager functions
public interface HistoryManager {
String getHistory(String fileName); // get document history
String getHistoryData(String fileName, String version, Boolean directUrl); // get document history data
String getHistoryData(String fileName, String version); // get document history data
String versionDir(String path, Integer version, boolean historyPath);
}

View File

@ -31,7 +31,6 @@ import lombok.Setter;
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Reference {
private Boolean directUrl;
private ReferenceData referenceData;
private String path;
private String link;

View File

@ -55,11 +55,6 @@ public class UrlManagerImpl extends DefaultUrlManager implements UrlManager {
return getDownloadUrl(fileId, true);
}
@Override
public String getDirectFileUrl(final String fileId) {
return getDownloadUrl(fileId, false);
}
@Override
public String getCreateUrl(final String fileId) {
return getCreateUrl(fileId, false);

View File

@ -93,7 +93,7 @@ public class ConfigServiceImpl extends DefaultConfigService implements ConfigSer
Config config = super.createConfig(fileId, mode, type);
if ((currentAction.equals(Action.fillForms) || currentAction.equals(Action.embedded))
if (!currentAction.equals(Action.view)
&& appUser.getPermissions().getSubmitForm()) {
config.getEditorConfig().getCustomization().setSubmitForm(true);
}
@ -276,7 +276,7 @@ public class ConfigServiceImpl extends DefaultConfigService implements ConfigSer
@Override
public Embedded getEmbedded(final String fileId) {
String url = getUrlManager().getDirectFileUrl(fileId);
String url = getUrlManager().getFileUrl(fileId);
return Embedded.builder()
.embedUrl(url)

View File

@ -1,4 +1,4 @@
server.version=1.10.0
server.version=1.11.0
server.address=
server.port=4000
@ -15,7 +15,7 @@ files.docservice.history.postfix=-hist
files.docservice.url.example=
files.docservice.languages=en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
files.docservice.languages=en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
docservice.url=http://documentserver/
docservice.ignoreSSLCertificate=false

View File

@ -16,7 +16,6 @@
*
*/
var directUrl;
var formatManager;
window.onload = function () {
@ -42,19 +41,8 @@ window.onload = function () {
if (typeof jQuery !== "undefined") {
jq = jQuery.noConflict();
directUrl = getUrlVars()["directUrl"] == "true";
mustReload = false;
if (directUrl)
jq("#directUrl").prop("checked", directUrl);
else
directUrl = jq("#directUrl").prop("checked");
jq("#directUrl").change(function() {
window.location = "?directUrl=" + jq(this).prop("checked");
});
jq(function () {
jq("#fileupload").fileupload({
dataType: "json",
@ -272,7 +260,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#beginEdit:not(.disable)", function () {
var fileId = encodeURIComponent(jq("#hiddenFileName").val());
var url = UrlEditor + "?action=edit&fileName=" + fileId + "&directUrl=" + directUrl;
var url = UrlEditor + "?action=edit&fileName=" + fileId;
window.open(url, "_blank");
jq("#hiddenFileName").val("");
jq.unblockUI();
@ -280,7 +268,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#beginView:not(.disable)", function () {
var fileId = encodeURIComponent(jq("#hiddenFileName").val());
var url = UrlEditor + "?action=view&fileName=" + fileId + "&directUrl=" + directUrl;
var url = UrlEditor + "?action=view&fileName=" + fileId;
window.open(url, "_blank");
jq("#hiddenFileName").val("");
jq.unblockUI();
@ -288,7 +276,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {
var fileId = encodeURIComponent(jq("#hiddenFileName").val());
var url = UrlEditor + "?type=embedded&action=embedded&fileName=" + fileId + "&directUrl=" + directUrl;
var url = UrlEditor + "?type=embedded&action=embedded&fileName=" + fileId;
jq("#mainProgress").addClass("embedded");
jq("#beginEmbedded").addClass("disable");

View File

@ -194,8 +194,6 @@
var requestReference = function(data, callback) {
innerAlert(data);
data.directUrl = !!config.document.directUrl;
let xhr = new XMLHttpRequest();
xhr.open("POST", "reference");
xhr.setRequestHeader("Content-Type", "application/json");
@ -220,8 +218,7 @@
var onRequestHistoryData = function (event) {
var version = event.data;
var historyDataUri = "historydata?fileName=" + config.document.title
+ "&version=" + version
+ "&directUrl=" + !!config.document.directUrl;
+ "&version=" + version;
var xhr = new XMLHttpRequest();
xhr.open("GET", historyDataUri, false);
xhr.send();

View File

@ -109,14 +109,6 @@
</select>
</td>
</tr>
<tr>
<td valign="middle">
<label class="side-option">
<input id="directUrl" type="checkbox" class="checkbox" />Try opening on client
<img id="directUrlInfo" class="info info-tooltip" data-id="directUrlInfo" data-tooltip="Some files can be opened in the user's browser without connecting to the document server." src="css/img/info.svg" />
</label>
</td>
</tr>
</tbody>
</table>
</div>
@ -173,52 +165,51 @@
<tr th:each="file,iState : ${files}" class="tableRow" th:title="${files[iState.index].getName() + versions[iState.index]}">
<td class="contentCells">
<a class="stored-edit" th:classappend="${docTypes[iState.index]}"
th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()}, __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
th:href="@{/editor(fileName=${files[iState.index].getName()})}" target="_blank">
<span th:text="${files[iState.index].getName()}"></span>
</a>
</td>
<th:block th:if="${filesEditable[iState.index]}">
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='edit', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='edit')}" target="_blank">
<img src="css/img/desktop.svg" alt="Open in editor for full size screens" title="Open in editor for full size screens"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='mobile',action='edit', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='mobile',action='edit')}" target="_blank">
<img src="css/img/mobile.svg" alt="Open in editor for mobile devices" title="Open in editor for mobile devices"/>
</a>
</td>
<div th:if="not ${docTypes[iState.index]} eq 'pdf'">
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='comment', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='comment')}" target="_blank">
<img src="css/img/comment.svg" alt="Open in editor for comment" title="Open in editor for comment"/>
</a>
</td>
</div>
<div th:if="${docTypes[iState.index]} eq 'word'">
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='review', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='review')}" target="_blank">
<img src="css/img/review.svg" alt="Open in editor for review" title="Open in editor for review"/>
</a>
</td>
</div>
<div th:if="${docTypes[iState.index]} eq 'cell'">
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='filter', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='filter')}" target="_blank">
<img src="css/img/filter.svg" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
</a>
</td>
</div>
<div th:if="${docTypes[iState.index]} eq 'word'">
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='blockcontent', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='blockcontent')}" target="_blank">
<img src="css/img/block-content.svg" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
</a>
</td>
@ -231,8 +222,8 @@
</div>
<div th:if="${isFillFormDoc[iState.index]}">
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='fillForms', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='fillForms')}" target="_blank">
<img src="css/img/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
</td>
@ -244,8 +235,8 @@
<th:block th:if="${isFillFormDoc[iState.index] and not filesEditable[iState.index]}">
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='mobile',action='fillForms', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='mobile',action='fillForms')}" target="_blank">
<img src="css/img/mobile-fill-forms.svg" alt="Open in editor for filling in forms for mobile devices" title="Open in editor for filling in forms for mobile devices" />
</a>
</td>
@ -253,8 +244,8 @@
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-icon "></td>
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='fillForms', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='fillForms')}" target="_blank">
<img src="css/img/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
</td>
@ -263,20 +254,20 @@
<td class="contentCells contentCells-shift contentCells-icon contentCellsEmpty" colspan="6"></td>
</th:block>
<td class="contentCells contentCells-icon firstContentCellViewers">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='view', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='desktop',action='view')}" target="_blank">
<img src="css/img/desktop.svg" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
</a>
</td>
<td class="contentCells contentCells-icon">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='mobile',action='view', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='mobile',action='view')}" target="_blank">
<img src="css/img/mobile.svg" alt="Open in viewer for mobile devices" title="Open in viewer for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<a th:with="directUrl=${directUrl}"
th:href="@{/editor(fileName=${files[iState.index].getName()},type='embedded',action='embedded', __(${#strings.isEmpty(directUrl)} ? '' : ('directUrl=' + ${directUrl}))__)}" target="_blank">
<a
th:href="@{/editor(fileName=${files[iState.index].getName()},type='embedded',action='embedded')}" target="_blank">
<img src="css/img/embeded.svg" alt="Open in embedded mode" title="Open in embedded mode"/>
</a>
</td>

View File

@ -164,7 +164,7 @@ public class FileModel {
}
// check if the Submit form button is displayed or not
if (mode.equals("fillForms") || mode.equals("embedded")) {
if (!mode.equals("view")) {
editorConfig.getCustomization().setSubmitForm(user.getId().equals("uid-1"));
}

View File

@ -192,8 +192,12 @@ public final class TrackManager {
ver.mkdirs();
}
// get the path to the previous file version and rename the last file version with it
lastVersion.renameTo(new File(versionDir + File.separator + "prev." + curExt));
if (lastVersion.exists()) {
// get the path to the previous file version and rename the last file version with it
lastVersion.renameTo(new File(versionDir + File.separator + "prev." + curExt));
} else {
throw new Exception("The file not exist: " + lastVersion.getAbsolutePath());
}
saveFile(byteArrayFile, toSave); // save document file

View File

@ -93,7 +93,7 @@ public final class Users {
"group-2", Arrays.asList("group-2", ""), new CommentGroups(null,
Arrays.asList("group-2", ""), Arrays.asList("group-2")), Arrays.asList("group-2", ""),
true, new ArrayList<String>(), descriptionUserSecond, false, true,
new Goback("Go to Documents", null)));
new Goback("Go to Documents", false)));
add(new User("uid-3", "Hamish Mitchell", null,
"group-3", Arrays.asList("group-2"), new CommentGroups(Arrays.asList("group-3", "group-2"),
Arrays.asList("group-2"), null), Arrays.asList("group-2"),

View File

@ -1,4 +1,4 @@
version=1.10.0
version=1.11.0
filesize-max=5242880
storage-folder=app_data
@ -8,13 +8,13 @@ enable-forgotten=TRUE
files.docservice.timeout=120000
files.docservice.url.site=http://documentserver/
files.docservice.url.converter=ConvertService.ashx
files.docservice.url.command=coauthoring/CommandService.ashx
files.docservice.url.converter=converter
files.docservice.url.command=command
files.docservice.url.api=web-apps/apps/api/documents/api.js
files.docservice.url.preloader=web-apps/apps/api/documents/cache-scripts.html
files.docservice.url.example=
files.docservice.languages=en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
files.docservice.languages=en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|he-IL:Hebrew (Israel)|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
files.docservice.secret=
files.docservice.header=Authorization

View File

@ -273,7 +273,9 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
const uploadDirTmp = path.join(uploadDir, 'tmp'); // and create directory for temporary files if it doesn't exist
req.DocManager.createDirectory(uploadDirTmp);
const form = new formidable.IncomingForm(); // create a new incoming form
const fileSizeLimit = configServer.get('maxFileSize');
// create a new incoming form
const form = new formidable.IncomingForm({ maxFileSize: fileSizeLimit, maxTotalFileSize: fileSizeLimit });
form.uploadDir = uploadDirTmp; // and write there all the necessary parameters
form.keepExtensions = true;
@ -298,7 +300,7 @@ app.post('/upload', (req, res) => { // define a handler for uploading files
file.originalFilename = req.DocManager.getCorrectName(file.originalFilename);
// check if the file size exceeds the maximum file size
if (configServer.get('maxFileSize') < file.size || file.size <= 0) {
if (fileSizeLimit < file.size || file.size <= 0) {
// DocManager.cleanFolderRecursive(uploadDirTmp, true); // clean the folder with temporary files
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('{ "error": "File size is incorrect"}');
@ -458,7 +460,7 @@ app.post('/convert', (req, res) => { // define a handler for converting files
if (fileUtility.getFileType(correctName) !== null) {
fileSystem.writeFileSync(req.DocManager.storagePath(correctName), data);
} else {
writeResult(newFileUri, result, 'FileTypeIsNotSupported');
writeResult(newFileUri.replace('http://localhost/', siteUrl), result, 'FileTypeIsNotSupported');
return;
}
// remove file with the origin extension
@ -1101,14 +1103,11 @@ app.get('/editor', (req, res) => { // define a handler for editing document
const key = req.DocManager.getKey(fileName);
const url = req.DocManager.getDownloadUrl(fileName, true);
const directUrl = req.DocManager.getDownloadUrl(fileName);
// check if this file can be filled
const canFill = fileUtility.getFillExtensions().indexOf(fileExt.slice(1)) !== -1;
let mode = req.query.mode || (canFill ? 'fillForms' : 'edit'); // mode: view/edit/review/comment/fillForms/embedded
let mode = req.query.mode || 'edit'; // mode: view/edit/review/comment/fillForms/embedded
let canEdit = fileUtility.getEditExtensions().indexOf(fileExt.slice(1)) !== -1; // check if this file can be edited
if (((!canEdit && mode === 'edit') || mode === 'fillForms')
&& canFill) {
&& fileUtility.getFillExtensions().indexOf(fileExt.slice(1)) !== -1) {
mode = 'fillForms';
canEdit = true;
}
@ -1117,7 +1116,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
}
let submitForm = false;
if (mode === 'fillForms' || mode === 'embedded') {
if (mode !== 'view') {
submitForm = userid === 'uid-1';
}

View File

@ -1,5 +1,5 @@
{
"version": "1.10.0",
"version": "1.11.0",
"log": {
"appenders": [
{
@ -17,8 +17,8 @@
"wopi": {
"discovery": "hosting/discovery"
},
"commandUrl": "coauthoring/CommandService.ashx",
"converterUrl": "ConvertService.ashx",
"commandUrl": "command",
"converterUrl": "converter",
"apiUrl": "web-apps/apps/api/documents/api.js",
"preloaderUrl": "web-apps/apps/api/documents/cache-scripts.html",
"exampleUrl": null,
@ -58,6 +58,7 @@
"gl": "Galego",
"de": "German",
"el": "Greek",
"he-IL": "Hebrew (Israel)",
"hu": "Hungarian",
"id": "Indonesian",
"it": "Italian",

View File

@ -64,7 +64,7 @@
</a>
</li>
<li>
<a href="wopi">Wopi</a>
<a href="wopi">WOPI</a>
</li>
<li class="active">
<a href="forgotten">Forgotten files</a>

View File

@ -133,7 +133,7 @@
</a>
</li>
<li>
<a href="wopi">Wopi</a>
<a href="wopi">WOPI</a>
</li>
<% if (enableForgotten) { %>
<li>
@ -196,14 +196,10 @@
<a class="action-link" href="editor?type=desktop&mode=edit&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">
<img src="images/desktop.svg" alt="Open in editor for full size screens" title="Open in editor for full size screens" /></a>
</td>
<% if (storedFiles[i].documentType !== "pdf") { %>
<td class="contentCells contentCells-icon">
<a class="action-link" href="editor?type=desktop&mode=comment&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">
<img src="images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment" /></a>
</td>
<% } else { %>
<td class="contentCells contentCells-icon"></td>
<% } %>
<% if (storedFiles[i].documentType == "word") { %>
<td class="contentCells contentCells-icon">
<a class="action-link" href="editor?type=desktop&mode=review&fileName=<%= encodeURIComponent(storedFiles[i].name) %>" target="_blank">

View File

@ -117,7 +117,7 @@
</a>
</li>
<li class="active">
<a href="wopi">Wopi</a>
<a href="wopi">WOPI</a>
</li>
<% if (enableForgotten) { %>
<li>

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
documentserver:
container_name: documentserver
image: onlyoffice/documentserver:8.0
image: onlyoffice/documentserver:8.2
expose:
- "80"
environment:

View File

@ -61,7 +61,7 @@ function saveas()
$formatManager = new FormatManager();
$post = json_decode(file_get_contents('php://input'), true);
$fileurl = $post["url"];
$fileurl = str_replace("//localhost", "//proxy", $post["url"]);
$title = $post["title"];
$extension = mb_strtolower(pathinfo($title, PATHINFO_EXTENSION));
$allexts = $formatManager->allExtensions();

View File

@ -22,7 +22,7 @@ use Example\Common\URL;
class ConfigurationManager
{
public string $version = '1.10.0';
public string $version = '1.11.0';
public function getVersion(): string
{
@ -73,7 +73,7 @@ class ConfigurationManager
{
$serverURL = $this->documentServerPrivateURL();
$path = getenv('DOCUMENT_SERVER_COMMAND_PATH')
?: 'coauthoring/CommandService.ashx';
?: 'command';
return $serverURL->joinPath($path);
}
@ -81,7 +81,7 @@ class ConfigurationManager
{
$serverURL = $this->documentServerPrivateURL();
$path = getenv('DOCUMENT_SERVER_CONVERTER_PATH')
?: 'ConvertService.ashx';
?: 'converter';
return $serverURL->joinPath($path);
}
@ -188,6 +188,7 @@ class ConfigurationManager
'gl' => 'Galego',
'de' => 'German',
'el' => 'Greek',
'he-IL' => 'Hebrew (Israel)',
'hu' => 'Hungarian',
'id' => 'Indonesian',
'it' => 'Italian',

View File

@ -42,7 +42,7 @@ final class ConfigurationManagerDocumentServerCommandURLTests extends TestCase
$configManager = new ConfigurationManager();
$url = $configManager->documentServerCommandURL();
$this->assertEquals(
'http://documentserver/coauthoring/CommandService.ashx',
'http://documentserver/command',
$url->string()
);
}

View File

@ -42,7 +42,7 @@ final class ConfigurationManagerDocumentServerConverterURLTests extends TestCase
$configManager = new ConfigurationManager();
$url = $configManager->documentServerConverterURL();
$this->assertEquals(
'http://documentserver/ConvertService.ashx',
'http://documentserver/converter',
$url->string()
);
}

View File

@ -83,7 +83,7 @@ final class DocEditorView extends View
}
// check if the Submit form button is displayed or not
$submitForm = in_array($editorsMode, ["fillForms", "embedded"]) && $user->id == "uid-1";
$submitForm = $editorsMode != "view" && $user->id == "uid-1";
$mode = $canEdit && $editorsMode != "view" ? "edit" : "view"; // define if the editing mode is edit or view
$type = empty($request["type"]) ? "desktop" : $request["type"];

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
documentserver:
container_name: documentserver
image: onlyoffice/documentserver:8.0
image: onlyoffice/documentserver:8.2
expose:
- "80"
environment:

View File

@ -22,7 +22,7 @@ from src.common import string
class ConfigurationManager:
version = '1.10.0'
version = '1.11.0'
def getVersion(self) -> str:
return self.version
@ -71,7 +71,7 @@ class ConfigurationManager:
base_url = server_url.geturl()
path = (
environ.get('DOCUMENT_SERVER_COMMAND_PATH') or
'/coauthoring/CommandService.ashx'
'/command'
)
url = urljoin(base_url, path)
return urlparse(url)
@ -81,7 +81,7 @@ class ConfigurationManager:
base_url = server_url.geturl()
path = (
environ.get('DOCUMENT_SERVER_CONVERTER_PATH') or
'/ConvertService.ashx'
'/converter'
)
url = urljoin(base_url, path)
return urlparse(url)
@ -145,6 +145,7 @@ class ConfigurationManager:
'gl': 'Galego',
'de': 'German',
'el': 'Greek',
'he-IL': 'Hebrew (Israel)',
'hu': 'Hungarian',
'id': 'Indonesian',
'it': 'Italian',

View File

@ -145,7 +145,7 @@ class ConfigurationManagerDocumentServerCommandURLTests(TestCase):
url = config_manager.document_server_command_url()
self.assertEqual(
url.geturl(),
'http://localhost/coauthoring/CommandService.ashx'
'http://localhost/command'
)
@patch.object(
@ -176,7 +176,7 @@ class ConfigurationManagerDocumentServerConverterURLTests(TestCase):
url = config_manager.document_server_converter_url()
self.assertEqual(
url.geturl(),
'http://localhost/ConvertService.ashx'
'http://localhost/converter'
)
@patch.object(

View File

@ -203,7 +203,7 @@ def commandRequest(method, key, meta=None):
verify=config_manager.ssl_verify_peer_mode_enabled(), timeout=5)
error = response.json()["error"]
if not error == 0:
if error not in (4, 0):
raise Exception(f"Command Service Error #{error}")
return response

View File

@ -207,7 +207,7 @@ def edit(request):
edMode = 'fillForms'
canEdit = True
# if the Submit form button is displayed or hidden
submitForm = edMode in ['fillForms', 'embedded'] and user.id == 'uid-1'
submitForm = edMode != 'view' and user.id == 'uid-1'
mode = 'edit' if canEdit & (edMode != 'view') else 'view' # if the file can't be edited, the mode is view
types = ['desktop', 'mobile', 'embedded']

View File

@ -51,7 +51,7 @@ def getForgottenFiles():
private_url = config_manager.document_server_private_url().geturl()
public_url = config_manager.document_server_public_url().geturl()
if private_url in file["url"]:
file["url"] = file["url"].replace(private_url, public_url)
file["url"] = file["url"].replace(private_url, public_url)
files.append(file)
except (Exception, ValueError) as error:
logging.error(error)

View File

@ -31,7 +31,7 @@ class ConfigurationManager
sig { void }
def initialize
@version = '1.10.0'
@version = '1.11.0'
end
sig { returns(T.nilable(URI::Generic)) }
@ -76,7 +76,7 @@ class ConfigurationManager
def document_server_command_uri
path =
ENV['DOCUMENT_SERVER_COMMAND_PATH'] ||
'/coauthoring/CommandService.ashx'
'/command'
URI.join(document_server_private_uri, path)
end
@ -84,7 +84,7 @@ class ConfigurationManager
def document_server_converter_uri
path =
ENV['DOCUMENT_SERVER_CONVERTER_PATH'] ||
'/ConvertService.ashx'
'/converter'
URI.join(document_server_private_uri, path)
end
@ -168,6 +168,7 @@ class ConfigurationManager
gl: 'Galego',
de: 'German',
el: 'Greek',
'he-IL': 'Hebrew (Israel)',
hu: 'Hungarian',
id: 'Indonesian',
it: 'Italian',

View File

@ -151,7 +151,7 @@ class ConfigurationManagerDocumentServerCommandURITests < Test::Unit::TestCase
uri = config_manager.document_server_command_uri
assert_equal(
uri.to_s,
'http://documentserver/coauthoring/CommandService.ashx'
'http://documentserver/command'
)
end
@ -175,7 +175,7 @@ class ConfigurationManagerDocumentServerConverterURITests < Test::Unit::TestCase
uri = config_manager.document_server_converter_uri
assert_equal(
uri.to_s,
'http://documentserver/ConvertService.ashx'
'http://documentserver/converter'
)
end

View File

@ -106,7 +106,7 @@ class FileModel
editors_mode = 'fillForms'
can_edit = true
end
submit_form = ['fillForms', 'embedded'].include?(editors_mode) && @user.id.eql?('uid-1') # Submit form button state
submit_form = !editors_mode.eql?('view') && @user.id.eql?('uid-1') # Submit form button state
mode = can_edit && !editors_mode.eql?('view') ? 'edit' : 'view'
# templates image url in the "From Template" section
templates_image_url = DocumentHelper.get_template_image_url(document_type)

View File

@ -109,23 +109,23 @@ class ServiceConverter
# add an error message to the error message template depending on the error code
case error_code
when -9
error_message = 'Error occurred in the ConvertService.ashx: Error conversion output format'
error_message = 'Error occurred in the ConvertService: Error conversion output format'
when -8
error_message = 'Error occurred in the ConvertService.ashx: Error document VKey'
error_message = 'Error occurred in the ConvertService: Error document VKey'
when -7
error_message = 'Error occurred in the ConvertService.ashx: Error document request'
error_message = 'Error occurred in the ConvertService: Error document request'
when -6
error_message = 'Error occurred in the ConvertService.ashx: Error database'
error_message = 'Error occurred in the ConvertService: Error database'
when -5
error_message = 'Error occurred in the ConvertService.ashx: Incorrect password'
error_message = 'Error occurred in the ConvertService: Incorrect password'
when -4
error_message = 'Error occurred in the ConvertService.ashx: Error download error'
error_message = 'Error occurred in the ConvertService: Error download error'
when -3
error_message = 'Error occurred in the ConvertService.ashx: Error convertation error'
error_message = 'Error occurred in the ConvertService: Error convertation error'
when -2
error_message = 'Error occurred in the ConvertService.ashx: Error convertation timeout'
error_message = 'Error occurred in the ConvertService: Error convertation timeout'
when -1
error_message = 'Error occurred in the ConvertService.ashx: Error convertation unknown'
error_message = 'Error occurred in the ConvertService: Error convertation unknown'
when 0
# public const int c_nErrorNo = 0
else

View File

@ -314,7 +314,7 @@ class TrackHelper
res = http.request(req) # get the response
data = res.body # and take its body
result = JSON.parse(data) # convert the response body into the json format
raise("Command service error: #{result['error']}") if result['error'] != 0
raise("Command service error: #{result['error']}") if [4, 0].exclude?(result['error'])
rescue StandardError => e
raise(e.message)
end

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
documentserver:
container_name: documentserver
image: onlyoffice/documentserver:8.0
image: onlyoffice/documentserver:8.2
expose:
- "80"
environment: