mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-03-16 02:32:36 +08:00
Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97c0952d0e | |||
| 3c7aa7707c | |||
| b528be73d8 | |||
| dc9ff1ae4a | |||
| 91551f4664 | |||
| da663c951e | |||
| 967287ab44 | |||
| d236bc0bcc | |||
| 333da622b3 | |||
| 19967b0940 | |||
| b0224993a2 | |||
| 449c6b55e6 | |||
| b39e5f4787 | |||
| 9d8bcda58b | |||
| f3a71ee26b | |||
| 480d68148d | |||
| 8b32812744 | |||
| edab397c98 | |||
| ab90b3eb32 | |||
| fdee619bb0 | |||
| 15f3f531f0 | |||
| 02be0dd321 | |||
| f8fbf35244 | |||
| f6227c8bc9 | |||
| 8301c63826 | |||
| 47c737c431 | |||
| d7b1a7f34f | |||
| 8e4dc58bf9 | |||
| 09e41f4c3d | |||
| 4bc09870a8 | |||
| 04aae40b66 | |||
| 67f453c4e0 | |||
| 9878583600 | |||
| 2fb6246f80 | |||
| 829f1b4226 | |||
| d532f3d8de | |||
| 0bdaa40036 | |||
| a60fd14daf | |||
| f55196a1b2 | |||
| bc434dea55 | |||
| 8c725214af | |||
| 4c331d56d7 | |||
| ea3667174f | |||
| ada17c99f7 | |||
| 7a1cc7cbdc | |||
| 9a7350e169 | |||
| 0c33288120 | |||
| aff50cca4a | |||
| 7aca0edfed | |||
| 2a3bcc0f67 | |||
| 1da1dec76c |
4
.github/workflows/licenses-go.yml
vendored
4
.github/workflows/licenses-go.yml
vendored
@ -15,6 +15,10 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.23'
|
||||
- name: Submodule Update
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -5,6 +5,9 @@
|
||||
[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/nodejs/public/assets/plugin-aiautofill"]
|
||||
path = web/documentserver-example/nodejs/public/assets/plugin-aiautofill
|
||||
url = https://github.com/ONLYOFFICE/plugin-aiautofill.git
|
||||
[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
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
# Change Log
|
||||
|
||||
## 1.15.0
|
||||
- nodejs: added AI Auto Fill Plugin
|
||||
- php-laravel: fix custom jwt header
|
||||
- formats for ds v9.1
|
||||
- formats for ds v9.3
|
||||
- user role
|
||||
- start filling
|
||||
- update demo files
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -893,6 +894,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -845,6 +845,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -398,7 +398,9 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -893,6 +894,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -849,6 +849,7 @@ footer a:hover {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
Submodule web/documentserver-example/csharp/assets/document-formats updated: 99725d9589...7d7576a3fe
@ -398,7 +398,9 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -79,7 +79,9 @@ func (srv *DefaultServerEndpointsHandler) Convert(w http.ResponseWriter, r *http
|
||||
return
|
||||
}
|
||||
|
||||
newUrl, newExt, err := srv.ConversionManager.GetConverterUri(fileUrl, fileExt, toExt, key, true, filename)
|
||||
newUrl, newExt, err := srv.ConversionManager.GetConverterUri(
|
||||
fileUrl, fileExt, toExt, key, true, filename, payload.Filepass,
|
||||
)
|
||||
if err != nil {
|
||||
response.Error = err.Error()
|
||||
srv.logger.Errorf("File conversion error: %s", err.Error())
|
||||
|
||||
@ -77,7 +77,10 @@ type ConversionManager interface {
|
||||
GetInternalExtension(fileType string) string
|
||||
IsCanConvert(ext string) bool
|
||||
IsCanFill(ext string) bool
|
||||
GetConverterUri(docUri, fromExt, toExt, docKey string, isAsync bool, title string) (string, string, error)
|
||||
GetConverterUri(
|
||||
docUri, fromExt, toExt, docKey string,
|
||||
isAsync bool, title string, filePass string,
|
||||
) (string, string, error)
|
||||
}
|
||||
|
||||
type CommandManager interface {
|
||||
|
||||
@ -103,6 +103,7 @@ func (cm DefaultConversionManager) GetConverterUri(
|
||||
docKey string,
|
||||
isAsync bool,
|
||||
title string,
|
||||
filePass string,
|
||||
) (string, string, error) {
|
||||
if fromExt == "" {
|
||||
fromExt = utils.GetFileExt(docUri, true)
|
||||
@ -115,6 +116,7 @@ func (cm DefaultConversionManager) GetConverterUri(
|
||||
Title: title,
|
||||
Key: docKey,
|
||||
Async: isAsync,
|
||||
Password: filePass,
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Minute * cm.config.JwtExpiresIn)),
|
||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||
|
||||
@ -30,23 +30,6 @@ type DefaultUserManager struct {
|
||||
|
||||
func NewDefaultUserManager(logger *zap.SugaredLogger) managers.UserManager {
|
||||
users := []models.User{
|
||||
{
|
||||
Id: "uid-0",
|
||||
Username: "",
|
||||
Email: "",
|
||||
Group: "",
|
||||
ReviewGroups: nil,
|
||||
CommentGroups: nil,
|
||||
UserInfoGroups: nil,
|
||||
Favorite: -1,
|
||||
DeniedPermissions: []string{"protect"},
|
||||
Description: descriptionUser0,
|
||||
Templates: false,
|
||||
Avatar: false,
|
||||
Goback: nil,
|
||||
Close: nil,
|
||||
Roles: []string{},
|
||||
},
|
||||
{
|
||||
Id: "uid-1",
|
||||
Username: "John Smith",
|
||||
@ -116,6 +99,23 @@ func NewDefaultUserManager(logger *zap.SugaredLogger) managers.UserManager {
|
||||
},
|
||||
Roles: []string{"role"},
|
||||
},
|
||||
{
|
||||
Id: "uid-0",
|
||||
Username: "",
|
||||
Email: "",
|
||||
Group: "",
|
||||
ReviewGroups: nil,
|
||||
CommentGroups: nil,
|
||||
UserInfoGroups: nil,
|
||||
Favorite: -1,
|
||||
DeniedPermissions: []string{"protect"},
|
||||
Description: descriptionUser0,
|
||||
Templates: false,
|
||||
Avatar: false,
|
||||
Goback: nil,
|
||||
Close: nil,
|
||||
Roles: []string{},
|
||||
},
|
||||
}
|
||||
return &DefaultUserManager{
|
||||
users,
|
||||
@ -197,7 +197,7 @@ func (um DefaultUserManager) GetUserById(uid string) (models.User, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return um.users[0], nil
|
||||
return um.GetUserById("uid-0")
|
||||
}
|
||||
|
||||
func (um DefaultUserManager) GetUserInfoById(uid string, serverAddress string) models.UserInfo {
|
||||
|
||||
@ -99,6 +99,7 @@ type ConvertRequestPayload struct {
|
||||
Key string `json:"key"`
|
||||
Async bool `json:"async"`
|
||||
JwtToken string `json:"token,omitempty"`
|
||||
Password string `json:"password"`
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ if (typeof jQuery !== "undefined") {
|
||||
var responseText = data.responseText;
|
||||
var response = jq.parseJSON(responseText);
|
||||
if (response.error) {
|
||||
if (response.error.includes("Incorrect password")) {
|
||||
if (response.error.includes("-5")) {
|
||||
jq(".current").removeClass("current");
|
||||
jq("#step2").addClass("error");
|
||||
jq("#blockPassword").show();
|
||||
@ -385,7 +385,9 @@ if (typeof jQuery !== "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -892,6 +893,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -846,6 +846,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ func (fm DefaultFormatManager) GetViewedExtensions() (viewed []string) {
|
||||
|
||||
func (fm DefaultFormatManager) GetEditedExtensions() (edited []string) {
|
||||
for _, f := range fm.formats {
|
||||
if slices.Contains(f.Actions, "edit") {
|
||||
if slices.Contains(f.Actions, "edit") || slices.Contains(f.Actions, "lossy-edit") {
|
||||
edited = append(edited, f.Name)
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ public class ExampleData {
|
||||
"Can view chat",
|
||||
"Has an avatar",
|
||||
"Can submit forms",
|
||||
"Has no roles",
|
||||
"Has role 'Anyone'",
|
||||
"Can start filling"
|
||||
);
|
||||
|
||||
@ -85,7 +85,7 @@ public class ExampleData {
|
||||
"Can view chat",
|
||||
"Has an avatar",
|
||||
"Can't submit forms",
|
||||
"Has role 'Anyone'",
|
||||
"Has role 'role'",
|
||||
"Can start filling"
|
||||
);
|
||||
|
||||
@ -105,7 +105,7 @@ public class ExampleData {
|
||||
"Can't close history",
|
||||
"Can't restore the file version",
|
||||
"Can't submit forms",
|
||||
"Has role 'role'",
|
||||
"Has no roles",
|
||||
"Can start filling"
|
||||
);
|
||||
|
||||
@ -114,19 +114,19 @@ public class ExampleData {
|
||||
"", List.of(FilterState.NULL.toString()), List.of(FilterState.NULL.toString()),
|
||||
List.of(FilterState.NULL.toString()), List.of(FilterState.NULL.toString()),
|
||||
List.of(FilterState.NULL.toString()), false, true, true, true,
|
||||
new Goback(null, false), new Close(null, false), null, true);
|
||||
new Goback(null, false), new Close(null, false), List.of("Anyone"), true);
|
||||
|
||||
// create user 2 with the specified parameters
|
||||
userService.createUser("Mark Pottato", "pottato@example.com", descriptionUserSecond,
|
||||
"group-2", List.of("", "group-2"), List.of(FilterState.NULL.toString()),
|
||||
List.of("group-2", ""), List.of("group-2"), List.of("group-2", ""), true, true,
|
||||
true, true, new Goback("Go to Documents", null), new Close(null, true), List.of("Anyone"), false);
|
||||
true, true, new Goback("Go to Documents", null), new Close(null, true), List.of("role"), false);
|
||||
|
||||
// create user 3 with the specified parameters
|
||||
userService.createUser("Hamish Mitchell", null, descriptionUserThird,
|
||||
"group-3", List.of("group-2"), List.of("group-2", "group-3"), List.of("group-2"),
|
||||
new ArrayList<>(), List.of("group-2"), null, true, true, false,
|
||||
null, new Close(null, true), List.of("role"), false);
|
||||
null, new Close(null, true), null, false);
|
||||
|
||||
// create user 0 with the specified parameters
|
||||
userService.createUser("Anonymous", null, descriptionUserZero, "",
|
||||
|
||||
@ -33,8 +33,8 @@ spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
hibernate.ddl-auto
|
||||
spring.h2.console.enabled=true
|
||||
spring.h2.console.path=/h2
|
||||
spring.servlet.multipart.max-file-size=5MB
|
||||
spring.servlet.multipart.max-request-size=5MB
|
||||
spring.servlet.multipart.max-file-size=100MB
|
||||
spring.servlet.multipart.max-request-size=100MB
|
||||
|
||||
url.index=/
|
||||
url.converter=/converter
|
||||
|
||||
@ -129,6 +129,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -880,6 +881,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -847,6 +847,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -390,7 +390,9 @@ if (typeof jQuery !== "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
version=1.15.0
|
||||
|
||||
filesize-max=5242880
|
||||
filesize-max=104857600
|
||||
storage-folder=app_data
|
||||
filename-max=50
|
||||
enable-forgotten=TRUE
|
||||
|
||||
@ -141,6 +141,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -879,6 +880,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -852,6 +852,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -397,7 +397,9 @@ if (typeof jQuery !== "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
// connect the necessary packages and modules
|
||||
const crypto = require('crypto');
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const favicon = require('serve-favicon');
|
||||
@ -34,6 +35,7 @@ const documentService = require('./helpers/documentService');
|
||||
const fileUtility = require('./helpers/fileUtility');
|
||||
const wopiApp = require('./helpers/wopi/wopiRouting');
|
||||
const users = require('./helpers/users');
|
||||
const dataAutofill = require('./config/data.json');
|
||||
|
||||
const configServer = config.get('server');
|
||||
const siteUrl = configServer.get('siteUrl');
|
||||
@ -222,6 +224,18 @@ app.get('/download', (req, res) => { // define a handler for downloading files
|
||||
filestream.pipe(res); // send file information to the response by streams
|
||||
});
|
||||
|
||||
app.get('/data', (req, res) => { // define a handler for getting sample ai form data
|
||||
if (!req.query.code) { // integration must validate incoming codes and generate new ones for each data request
|
||||
res.sendStatus(403);
|
||||
return;
|
||||
}
|
||||
|
||||
res.send({
|
||||
data: dataAutofill,
|
||||
code: crypto.randomBytes(16).toString('hex'),
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/history', (req, res) => {
|
||||
req.DocManager = new DocManager(req, res);
|
||||
if (cfgSignatureEnable && cfgSignatureUseForRequest) {
|
||||
@ -1132,8 +1146,9 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
||||
type = 'desktop';
|
||||
}
|
||||
|
||||
const templatesImageUrl = req.DocManager.getTemplateImageUrl(fileUtility.getFileType(fileName));
|
||||
const createUrl = req.DocManager.getCreateUrl(fileUtility.getFileType(fileName), userid, type, lang);
|
||||
const fileType = fileUtility.getFileType(fileName);
|
||||
const templatesImageUrl = req.DocManager.getTemplateImageUrl(fileType);
|
||||
const createUrl = req.DocManager.getCreateUrl(fileType, userid, type, lang);
|
||||
let templates = null;
|
||||
if (createUrl != null) {
|
||||
templates = [
|
||||
@ -1203,6 +1218,38 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
||||
user.goback.url = `${req.DocManager.getServerUrl()}/`;
|
||||
}
|
||||
|
||||
let pluginsConfig;
|
||||
if (fileType === fileUtility.fileType.pdf // pdf form only
|
||||
&& userid !== 'uid-0' // users only
|
||||
&& mode !== 'comment') { // form field must be editable
|
||||
const baseUrl = configServer.has('exampleUrl') && configServer.get('exampleUrl')
|
||||
? configServer.get('exampleUrl')
|
||||
: req.DocManager.getServerUrl();
|
||||
|
||||
const pluginGuid = 'asc.{6A95DA5C-857E-4C26-B00B-34876F1EEAD8}';
|
||||
const pluginCode = crypto.randomBytes(16).toString('hex');
|
||||
|
||||
pluginsConfig = {
|
||||
autostart: [...new Set([
|
||||
(mode === 'fillForms' ? pluginGuid : []),
|
||||
...(plugins.autostart || []),
|
||||
])],
|
||||
options: {
|
||||
[pluginGuid]: {
|
||||
code: pluginCode,
|
||||
callback: `${baseUrl}/data`,
|
||||
},
|
||||
...(plugins.options || {}),
|
||||
},
|
||||
pluginsData: [...new Set([
|
||||
`${baseUrl}/assets/plugin-aiautofill/config.json`,
|
||||
...(plugins.pluginsData || []),
|
||||
])],
|
||||
};
|
||||
} else {
|
||||
pluginsConfig = plugins;
|
||||
}
|
||||
|
||||
// file config data
|
||||
const argss = {
|
||||
apiUrl: siteUrl + configServer.get('apiUrl'),
|
||||
@ -1217,7 +1264,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
||||
},
|
||||
editor: {
|
||||
type,
|
||||
documentType: fileUtility.getFileType(fileName),
|
||||
documentType: fileType,
|
||||
key,
|
||||
token: '',
|
||||
callbackUrl: req.DocManager.getCallback(fileName),
|
||||
@ -1248,7 +1295,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
|
||||
userInfoGroups: JSON.stringify(userInfoGroups),
|
||||
fileChoiceUrl,
|
||||
submitForm,
|
||||
plugins: JSON.stringify(plugins),
|
||||
plugins: JSON.stringify(pluginsConfig),
|
||||
actionData,
|
||||
fileKey: userid !== 'uid-0'
|
||||
? JSON.stringify({ fileName, userAddress: req.DocManager.curUserHostAddress() }) : null,
|
||||
|
||||
304
web/documentserver-example/nodejs/config/data.json
Normal file
304
web/documentserver-example/nodejs/config/data.json
Normal file
@ -0,0 +1,304 @@
|
||||
{
|
||||
"sellers": [
|
||||
{
|
||||
"name": "John Anderson",
|
||||
"email": "john.anderson@example.com",
|
||||
"phone": "+1-234-567-8900",
|
||||
"mobile": "+1-234-567-8901",
|
||||
"address": "123 Main St",
|
||||
"city": "Chicago",
|
||||
"state": "IL",
|
||||
"zip": "60601",
|
||||
"country": "USA",
|
||||
"company": "Tech Solutions LLC"
|
||||
},
|
||||
{
|
||||
"name": "Maria Garcia",
|
||||
"email": "maria.garcia@ventas.es",
|
||||
"phone": "+34-912-345-678",
|
||||
"mobile": "+34-600-123-456",
|
||||
"address": "Calle Mayor 45",
|
||||
"city": "Madrid",
|
||||
"state": "Madrid",
|
||||
"zip": "28013",
|
||||
"country": "Spain",
|
||||
"company": "Soluciones Digitales SA"
|
||||
}
|
||||
],
|
||||
"deals": [
|
||||
{
|
||||
"name": "Enterprise Software License",
|
||||
"number": "DL-2025-001",
|
||||
"date": "2025-01-15",
|
||||
"closeDate": "2025-03-30",
|
||||
"status": "pending",
|
||||
"amount": 125000,
|
||||
"currency": "USD",
|
||||
"description": "Annual enterprise software license with premium support package"
|
||||
},
|
||||
{
|
||||
"name": "Cloud Infrastructure Migration",
|
||||
"number": "DL-2025-002",
|
||||
"date": "2025-02-10",
|
||||
"closeDate": "2025-06-15",
|
||||
"status": "in_progress",
|
||||
"amount": 450000,
|
||||
"currency": "EUR",
|
||||
"description": "Complete cloud migration service with training and support"
|
||||
}
|
||||
],
|
||||
"buyers": [
|
||||
{
|
||||
"name": "Jane Mitchell",
|
||||
"email": "jane.mitchell@techcorp.com",
|
||||
"phone": "+1-987-654-3210",
|
||||
"mobile": "+1-987-654-3211",
|
||||
"address": "321 Park Avenue",
|
||||
"city": "New York",
|
||||
"state": "NY",
|
||||
"zip": "10001",
|
||||
"country": "USA",
|
||||
"company": "TechCorp International",
|
||||
"department": "IT"
|
||||
},
|
||||
{
|
||||
"name": "Pierre Dubois",
|
||||
"email": "p.dubois@innovatech.fr",
|
||||
"phone": "+33-1-42-34-56-78",
|
||||
"mobile": "+33-6-12-34-56-78",
|
||||
"address": "15 Avenue des Champs-Élysées",
|
||||
"city": "Paris",
|
||||
"state": "Île-de-France",
|
||||
"zip": "75008",
|
||||
"country": "France",
|
||||
"company": "InnovaTech France",
|
||||
"department": "Procurement"
|
||||
}
|
||||
],
|
||||
"companies": [
|
||||
{
|
||||
"name": "Acme Corporation",
|
||||
"email": "info@acmecorp.com",
|
||||
"phone": "+1-312-555-0100",
|
||||
"website": "https://www.acmecorp.com",
|
||||
"address": "456 Business Plaza",
|
||||
"city": "Chicago",
|
||||
"state": "IL",
|
||||
"zip": "60602",
|
||||
"country": "USA",
|
||||
"industry": "Technology"
|
||||
},
|
||||
{
|
||||
"name": "Global Innovations Ltd",
|
||||
"email": "contact@globalinnov.co.uk",
|
||||
"phone": "+44-20-7123-4567",
|
||||
"website": "https://www.globalinnov.co.uk",
|
||||
"address": "88 Piccadilly Street",
|
||||
"city": "London",
|
||||
"state": "England",
|
||||
"zip": "W1J 9HF",
|
||||
"country": "United Kingdom",
|
||||
"industry": "Consulting"
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"name": "Premium Software Suite",
|
||||
"sku": "SW-PREM-001",
|
||||
"category": "Software",
|
||||
"quantity": 100,
|
||||
"price": 999.99,
|
||||
"currency": "USD",
|
||||
"description": "Comprehensive software package with all premium features"
|
||||
},
|
||||
{
|
||||
"name": "Professional Laptop",
|
||||
"sku": "HW-LAP-PRO-15",
|
||||
"category": "Hardware",
|
||||
"quantity": 50,
|
||||
"price": 1499.99,
|
||||
"currency": "USD",
|
||||
"description": "15-inch professional laptop with high-performance specs"
|
||||
},
|
||||
{
|
||||
"name": "Cloud Storage Plan - Business",
|
||||
"sku": "CLD-STR-BIZ-1TB",
|
||||
"category": "Services",
|
||||
"quantity": 1,
|
||||
"price": 29.99,
|
||||
"currency": "USD",
|
||||
"description": "1TB cloud storage with business features (monthly subscription)"
|
||||
}
|
||||
],
|
||||
"persons": [
|
||||
{
|
||||
"name": "John Anderson",
|
||||
"firstName": "John",
|
||||
"middleName": "Michael",
|
||||
"lastName": "Anderson",
|
||||
"dateOfBirth": "1990-01-15",
|
||||
"gender": "Male",
|
||||
"title": "Senior Software Engineer",
|
||||
"email": "john.anderson@example.com",
|
||||
"phone": "+1-234-567-8900",
|
||||
"mobile": "+1-234-567-8901",
|
||||
"address": "123 Main Street, Apt 4B",
|
||||
"city": "Chicago",
|
||||
"state": "IL",
|
||||
"zip": "60601",
|
||||
"country": "USA",
|
||||
"website": "johnanderson.dev"
|
||||
},
|
||||
{
|
||||
"name": "Yuki Tanaka",
|
||||
"firstName": "Yuki",
|
||||
"lastName": "Tanaka",
|
||||
"dateOfBirth": "1988-07-22",
|
||||
"gender": "Female",
|
||||
"title": "UX/UI Designer",
|
||||
"email": "yuki.tanaka@design.jp",
|
||||
"phone": "+81-3-1234-5678",
|
||||
"mobile": "+81-90-1234-5678",
|
||||
"address": "1-2-3 Shibuya",
|
||||
"city": "Tokyo",
|
||||
"state": "Tokyo",
|
||||
"zip": "150-0002",
|
||||
"country": "Japan",
|
||||
"website": "yukitanaka.design"
|
||||
},
|
||||
{
|
||||
"name": "Sarah Johnson",
|
||||
"firstName": "Sarah",
|
||||
"lastName": "Johnson",
|
||||
"employeeId": "ACM-2019-1234",
|
||||
"personalEmail": "sarah.j.personal@gmail.com",
|
||||
"department": "Product Development",
|
||||
"jobPosition": "Senior Product Manager",
|
||||
"hireDate": "2019-03-15",
|
||||
"salary": 120000,
|
||||
"salaryCurrency": "USD"
|
||||
},
|
||||
{
|
||||
"name": "Carlos Rodriguez",
|
||||
"firstName": "Carlos",
|
||||
"lastName": "Rodriguez",
|
||||
"employeeId": "ACM-2020-5678",
|
||||
"personalEmail": "carlos.rod.personal@gmail.com",
|
||||
"department": "Engineering",
|
||||
"jobPosition": "DevOps Engineer",
|
||||
"hireDate": "2020-07-20",
|
||||
"salary": 105000,
|
||||
"salaryCurrency": "USD"
|
||||
}
|
||||
],
|
||||
"invoices": [
|
||||
{
|
||||
"number": "INV-2025-0001",
|
||||
"date": "2025-01-15",
|
||||
"dueDate": "2025-02-15",
|
||||
"status": "paid",
|
||||
"subtotal": 10000,
|
||||
"tax": 800,
|
||||
"taxRate": 8,
|
||||
"discount": 500,
|
||||
"total": 10300,
|
||||
"currency": "USD",
|
||||
"notes": "Payment received on time. Thank you for your business!",
|
||||
"items": [
|
||||
{
|
||||
"productId": "P001",
|
||||
"description": "Premium Software Suite - 10 licenses",
|
||||
"quantity": 10,
|
||||
"unitPrice": 999.99,
|
||||
"total": 9999.90
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"number": "INV-2025-0002",
|
||||
"date": "2025-02-01",
|
||||
"dueDate": "2025-03-01",
|
||||
"status": "pending",
|
||||
"subtotal": 75000,
|
||||
"tax": 6000,
|
||||
"taxRate": 8,
|
||||
"discount": 0,
|
||||
"total": 81000,
|
||||
"currency": "USD",
|
||||
"notes": "Payment terms: Net 30 days",
|
||||
"items": [
|
||||
{
|
||||
"productId": "P002",
|
||||
"description": "Professional Laptop - 50 units",
|
||||
"quantity": 50,
|
||||
"unitPrice": 1499.99,
|
||||
"total": 74999.50
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"customers": [
|
||||
{
|
||||
"type": "individual",
|
||||
"firstName": "Emily",
|
||||
"lastName": "Chen",
|
||||
"email": "emily.chen@email.com",
|
||||
"phone": "+1-555-111-2222",
|
||||
"dateOfBirth": "1985-09-14",
|
||||
"registrationDate": "2023-01-10",
|
||||
"totalOrders": 15,
|
||||
"totalSpent": 4500.75,
|
||||
"address": {
|
||||
"street": "567 Oak Street",
|
||||
"city": "Seattle",
|
||||
"state": "WA",
|
||||
"zip": "98101",
|
||||
"country": "USA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "business",
|
||||
"companyName": "TechStart Solutions",
|
||||
"contactPerson": "Robert Kim",
|
||||
"email": "robert.kim@techstart.com",
|
||||
"phone": "+1-555-333-4444",
|
||||
"registrationDate": "2022-06-20",
|
||||
"totalOrders": 42,
|
||||
"totalSpent": 125000.00,
|
||||
"address": {
|
||||
"street": "890 Enterprise Boulevard",
|
||||
"city": "Austin",
|
||||
"state": "TX",
|
||||
"zip": "78701",
|
||||
"country": "USA"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "Annual Tech Conference 2025",
|
||||
"type": "conference",
|
||||
"startDate": "2025-06-15",
|
||||
"endDate": "2025-06-17",
|
||||
"startTime": "09:00",
|
||||
"endTime": "18:00",
|
||||
"timezone": "America/New_York",
|
||||
"location": {
|
||||
"name": "Convention Center",
|
||||
"address": "100 Convention Plaza",
|
||||
"city": "New York",
|
||||
"state": "NY",
|
||||
"zip": "10001",
|
||||
"country": "USA"
|
||||
},
|
||||
"capacity": 5000,
|
||||
"registered": 3500,
|
||||
"status": "upcoming",
|
||||
"organizer": "Tech Events Inc",
|
||||
"description": "Join us for the biggest tech conference of the year featuring keynotes from industry leaders.",
|
||||
"ticketPrice": 299.00,
|
||||
"currency": "USD",
|
||||
"website": "https://techconf2025.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -16,6 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const pathModule = require('path');
|
||||
const supportedFormats = require('../public/assets/document-formats/onlyoffice-docs-formats.json'); // eslint-disable-line
|
||||
|
||||
const fileUtility = {};
|
||||
@ -39,8 +40,7 @@ fileUtility.getFileNameFromUrl = function getFileNameFromUrl(url, withoutExtensi
|
||||
fileUtility.getFileName = function getFileName(path, withoutExtension) {
|
||||
if (!path) return '';
|
||||
|
||||
const parts = path.split('/');
|
||||
const fileName = parts.pop(); // get the file name from the last part of the path
|
||||
const fileName = pathModule.basename(path); // get the file name from the last part of the path
|
||||
|
||||
// get file name without extension
|
||||
if (withoutExtension) {
|
||||
|
||||
@ -116,6 +116,7 @@ const descrUser0 = [
|
||||
'Has empty role',
|
||||
'Can\'t submit forms',
|
||||
'Tour of tips when opening a document',
|
||||
'Without AI Auto Fill Plugin',
|
||||
];
|
||||
|
||||
const users = [
|
||||
|
||||
Submodule web/documentserver-example/nodejs/public/assets/plugin-aiautofill added at ea67d52df5
@ -442,7 +442,9 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -10,7 +10,7 @@ DOCS_INTEGRATION_SDK_CONVERT_SERVICE_URL=/converter
|
||||
DOCUMENT_STORAGE_PUBLIC_URL=http://localhost
|
||||
DOCUMENT_STORAGE_PRIVATE_URL=http://proxy
|
||||
|
||||
DOCUMENT_STORAGE_MAXIMUM_FILE_SIZE=5242880
|
||||
DOCUMENT_STORAGE_MAXIMUM_FILE_SIZE=104857600
|
||||
|
||||
DOCUMENT_STORAGE_DISPLAY_FORGOTTEN_PAGE=false
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ class FileController extends Controller
|
||||
fileType: PathInfo::extension($request->filename),
|
||||
outputType: $request->input('fileExt', 'ooxml'),
|
||||
url: $request->fileUri,
|
||||
password: $request->password,
|
||||
password: $request->filePass,
|
||||
user: $request->user,
|
||||
userAddress: $request->ip(),
|
||||
lang: cache('lang', default: 'en'),
|
||||
|
||||
@ -14,7 +14,7 @@ class CheckAndDecodeJWTPayload
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
* @param Closure(Request): (Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
|
||||
@ -11,7 +11,7 @@ class EnsureForgottenPageEnabled
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
* @param Closure(Request): (Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ class EnsureJWTTokenIsPresent
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
* @param Closure(Request): (Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
|
||||
@ -12,7 +12,7 @@ class EnsureUserDirectoryExists
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
* @param Closure(Request): (Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
|
||||
@ -74,7 +74,7 @@ class SettingsManager extends OnlyOfficeSettingsManager
|
||||
],
|
||||
],
|
||||
'file' => [
|
||||
'max_size' => env('DOCUMENT_STORAGE_MAXIMUM_FILE_SIZE', 5 * 1024 * 1024),
|
||||
'max_size' => env('DOCUMENT_STORAGE_MAXIMUM_FILE_SIZE', 100 * 1024 * 1024),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@ -36,6 +36,9 @@ class ConvertRequest
|
||||
false,
|
||||
$data['lang'],
|
||||
$data['filename'],
|
||||
$data['codePage'] ?? null,
|
||||
$data['delimiter'] ?? null,
|
||||
$data['password'] ?? null,
|
||||
);
|
||||
|
||||
if (property_exists($result, 'Error')) {
|
||||
|
||||
@ -30,7 +30,7 @@ class CreateDocumentRequest
|
||||
public mixed $fileContent,
|
||||
public string $user,
|
||||
) {
|
||||
if ($fileSize && ($fileSize <= 0 || $fileSize > env('STORAGE_MAXIMUM_FILE_SIZE', 5 * 1024 * 1024))) {
|
||||
if ($fileSize && ($fileSize <= 0 || $fileSize > env('DOCUMENT_STORAGE_MAXIMUM_FILE_SIZE', 100 * 1024 * 1024))) {
|
||||
throw new UnexpectedValueException("Incorrect file size: $fileSize");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Providers\AppServiceProvider;
|
||||
|
||||
return [
|
||||
App\Providers\AppServiceProvider::class,
|
||||
AppServiceProvider::class,
|
||||
];
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
@ -62,7 +64,7 @@ return [
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||
'model' => env('AUTH_MODEL', User::class),
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
|
||||
@ -2,12 +2,13 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
* @extends Factory<User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
|
||||
@ -11,7 +11,7 @@ services:
|
||||
|
||||
documentserver:
|
||||
container_name: documentserver
|
||||
image: onlyoffice/documentserver:8.2
|
||||
image: onlyoffice/documentserver:9.3
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
|
||||
@ -834,6 +834,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -398,6 +399,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer table tr {
|
||||
|
||||
@ -421,9 +421,11 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#convertStep2").removeClass("current").addClass("done");
|
||||
jq("#convertStep2").text(`2. File conversion to ${fileExt}`);
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -893,6 +894,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -847,6 +847,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
Submodule web/documentserver-example/php/assets/document-formats updated: 99725d9589...7d7576a3fe
@ -413,7 +413,9 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -3,7 +3,7 @@ version: "3.8"
|
||||
services:
|
||||
documentserver:
|
||||
container_name: documentserver
|
||||
image: onlyoffice/documentserver:8.2
|
||||
image: onlyoffice/documentserver:9.3
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
|
||||
@ -152,7 +152,7 @@ class ConfigurationManager
|
||||
{
|
||||
$size = getenv('MAXIMUM_FILE_SIZE');
|
||||
if (!$size) {
|
||||
return 5 * 1024 * 1024;
|
||||
return 100 * 1024 * 1024;
|
||||
}
|
||||
return intval($size);
|
||||
}
|
||||
|
||||
@ -758,8 +758,8 @@ function getConvertedData(
|
||||
$documentRevisionID,
|
||||
$async,
|
||||
&$convertedDocumentURL,
|
||||
$filePass,
|
||||
$lang,
|
||||
$filePass = null,
|
||||
$lang = null,
|
||||
$fileName = null
|
||||
) {
|
||||
$convertedDocumentURL = "";
|
||||
|
||||
@ -47,3 +47,15 @@
|
||||
:why: MIT
|
||||
:versions: []
|
||||
:when: 2025-11-07 10:13:51.477550000 Z
|
||||
- - :approve
|
||||
- msgspec
|
||||
- :who:
|
||||
:why: BSD-3-Clause
|
||||
:versions: []
|
||||
:when: 2025-11-07 10:13:51.477550000 Z
|
||||
- - :approve
|
||||
- pyjwt
|
||||
- :who:
|
||||
:why: MIT
|
||||
:versions: []
|
||||
:when: 2025-11-07 10:13:51.477550000 Z
|
||||
|
||||
Submodule web/documentserver-example/python/assets/document-formats updated: 99725d9589...7d7576a3fe
@ -3,7 +3,7 @@ version: "3.8"
|
||||
services:
|
||||
documentserver:
|
||||
container_name: documentserver
|
||||
image: onlyoffice/documentserver:8.2
|
||||
image: onlyoffice/documentserver:9.3
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
|
||||
@ -116,7 +116,7 @@ class ConfigurationManager:
|
||||
size = environ.get('MAXIMUM_FILE_SIZE')
|
||||
if size:
|
||||
return int(size)
|
||||
return 5 * 1024 * 1024
|
||||
return 100 * 1024 * 1024
|
||||
|
||||
def conversion_timeout(self) -> int:
|
||||
timeout = environ.get('CONVERSION_TIMEOUT')
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -892,6 +893,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -846,6 +846,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -397,7 +397,9 @@ if (typeof jQuery !== "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -136,6 +136,8 @@ GEM
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.18.9-x86_64-linux-gnu)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.18.9-x86_64-linux-musl)
|
||||
racc (~> 1.4)
|
||||
parallel (1.24.0)
|
||||
parser (3.3.0.5)
|
||||
ast (~> 2.4.1)
|
||||
@ -286,8 +288,9 @@ GEM
|
||||
zeitwerk (2.6.13)
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin-22
|
||||
arm64-darwin
|
||||
x86_64-linux
|
||||
x86_64-linux-musl
|
||||
|
||||
DEPENDENCIES
|
||||
byebug (~> 11.1)
|
||||
|
||||
@ -402,7 +402,9 @@ if (typeof jQuery != "undefined") {
|
||||
jq("#downloadConverted").removeClass("disable");
|
||||
jq("#hiddenFileName").attr("data",response.filename);
|
||||
if (response.error !== "FileTypeIsNotSupported") {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
if (formatManager.isEditable(fileExt)) {
|
||||
jq("#beginEditConverted").removeClass("disable");
|
||||
}
|
||||
jq("#beginViewConverted").removeClass("disable");
|
||||
jq("#downloadConverted").attr("data","fromStorage");
|
||||
} else {
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -892,6 +893,7 @@
|
||||
|
||||
.scroll-table-body {
|
||||
top: 36px;
|
||||
height: calc(100% - 34px);
|
||||
}
|
||||
|
||||
.scroll-table-body tr:first-child {
|
||||
|
||||
@ -847,6 +847,7 @@ footer table tr td:first-child {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
height: calc(100% - 130px);
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ class ConfigurationManager
|
||||
env = ENV.fetch('MAXIMUM_FILE_SIZE', nil)
|
||||
return Integer(env, 10) if env
|
||||
|
||||
5 * 1024 * 1024
|
||||
100 * 1024 * 1024
|
||||
end
|
||||
|
||||
sig { returns(Numeric) }
|
||||
|
||||
@ -84,6 +84,13 @@ class TrackHelper
|
||||
copied['changesurl'] = resolved_uri.to_s
|
||||
end
|
||||
|
||||
formsdataurl = copied['formsdataurl']
|
||||
if formsdataurl
|
||||
uri = URI(formsdataurl)
|
||||
resolved_uri = TrackHelper.proxy_manager.resolve_uri(uri)
|
||||
copied['formsdataurl'] = resolved_uri.to_s
|
||||
end
|
||||
|
||||
home = copied['home']
|
||||
copied['home'] = resolve_process_save_body(home) if home
|
||||
|
||||
@ -180,7 +187,9 @@ class TrackHelper
|
||||
end
|
||||
|
||||
# file force saving process
|
||||
def self.process_force_save(file_data, file_name, user_address)
|
||||
def self.process_force_save(raw_file_data, file_name, user_address)
|
||||
file_data = resolve_process_save_body(raw_file_data)
|
||||
|
||||
download_uri = file_data['url']
|
||||
if download_uri.eql?(nil)
|
||||
saved = 1
|
||||
@ -222,7 +231,7 @@ class TrackHelper
|
||||
|
||||
begin
|
||||
# check if the forcesave type is equal to 3 (the form was submitted)
|
||||
is_submit_form = Integer(file_data['forcesavetype'], 10) == 3
|
||||
is_submit_form = file_data['forcesavetype'].to_s == '3'
|
||||
|
||||
if is_submit_form
|
||||
file_name = if new_file_name
|
||||
|
||||
Submodule web/documentserver-example/ruby/assets/document-formats updated: 99725d9589...7d7576a3fe
@ -3,7 +3,7 @@ version: "3.8"
|
||||
services:
|
||||
documentserver:
|
||||
container_name: documentserver
|
||||
image: onlyoffice/documentserver:8.2
|
||||
image: onlyoffice/documentserver:9.3
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user