From 6d33229b382be6918b21c42a01f499fa80411fe8 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Mon, 19 Jul 2021 12:01:38 +0300 Subject: [PATCH] [config] Turn on assemblyFormatAsOrigin by default --- Common/config/default.json | 2 +- DocService/sources/converterservice.js | 4 +++- FileConverter/sources/converter.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Common/config/default.json b/Common/config/default.json index 4d8818f9..ced58417 100644 --- a/Common/config/default.json +++ b/Common/config/default.json @@ -120,7 +120,7 @@ "maxRequestChanges": 20000, "openProtectedFile": true, "editorDataStorage": "editorDataMemory", - "assemblyFormatAsOrigin": false + "assemblyFormatAsOrigin": true }, "requestDefaults": { "headers": { diff --git a/DocService/sources/converterservice.js b/DocService/sources/converterservice.js index a0354690..fca12774 100644 --- a/DocService/sources/converterservice.js +++ b/DocService/sources/converterservice.js @@ -97,7 +97,9 @@ function* getConvertPath(docId, fileTo, formatTo) { return docId + '/' + fileTo; } function* getConvertUrl(baseUrl, fileToPath, title) { - title = path.basename(title, path.extname(title)) + path.extname(fileToPath); + if (title) { + title = path.basename(title, path.extname(title)) + path.extname(fileToPath); + } return yield storage.getSignedUrl(baseUrl, fileToPath, commonDefines.c_oAscUrlTypes.Temporary, title); } function* convertByCmd(cmd, async, opt_fileTo, opt_taskExist, opt_priority, opt_expiration, opt_queue) { diff --git a/FileConverter/sources/converter.js b/FileConverter/sources/converter.js index 4cf0c797..7ee1558c 100644 --- a/FileConverter/sources/converter.js +++ b/FileConverter/sources/converter.js @@ -580,7 +580,7 @@ function* postProcess(cmd, dataConvert, tempDirs, childRes, error, isTimeout) { } if (!existFile) { //todo пересмотреть. загрулка в случае AVS_OFFICESTUDIO_FILE_OTHER_OOXML x2t меняет расширение у файла. - var fileToBasename = path.basename(dataConvert.fileTo); + var fileToBasename = path.basename(dataConvert.fileTo, path.extname(dataConvert.fileTo)); var fileToDir = path.dirname(dataConvert.fileTo); var files = fs.readdirSync(fileToDir); for (var i = 0; i < files.length; ++i) {