mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-03-12 07:41:47 +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 }}
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -5,11 +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
|
||||
branch = release/v9.3.0
|
||||
[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
|
||||
branch = develop
|
||||
[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,10 +1,9 @@
|
||||
# Change Log
|
||||
|
||||
- nodejs: support tsv
|
||||
|
||||
## 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 {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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
@ -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
|
||||
|
||||
Reference in New Issue
Block a user