mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[se] Fix error while downloadas; For bug 62643
This commit is contained in:
@ -1805,7 +1805,7 @@ async function processWopiSaveAs(ctx, cmd) {
|
||||
const { wopiSrc, access_token } = info.wopiParams.userAuth;
|
||||
res = await wopiClient.putRelativeFile(ctx, wopiSrc, access_token, null, stream.readStream, stream.contentLength, suggestedExt, suggestedTarget, false);
|
||||
}
|
||||
return res;
|
||||
return {res: res, wopiParams: info?.wopiParams};
|
||||
}
|
||||
exports.receiveTask = function(data, ack) {
|
||||
return co(function* () {
|
||||
@ -1827,10 +1827,10 @@ exports.receiveTask = function(data, ack) {
|
||||
yield getOutputData(ctx, cmd, outputData, cmd.getDocId(), null, additionalOutput);
|
||||
} else if ('save' === command || 'savefromorigin' === command) {
|
||||
let status = yield getOutputData(ctx, cmd, outputData, cmd.getDocId() + cmd.getSaveKey(), null, additionalOutput);
|
||||
if (commonDefines.FileStatus.Ok === status && (undefined !== cmd.getSaveAsPath() || cmd.getIsSaveAs())) {
|
||||
if (commonDefines.FileStatus.Ok === status && (cmd.getSaveAsPath() || cmd.getIsSaveAs())) {
|
||||
//todo in case of wopi no need to send url. send it to avoid stubs in sdk
|
||||
let saveAsRes = yield processWopiSaveAs(ctx, cmd);
|
||||
if (!saveAsRes) {
|
||||
if (!saveAsRes.res && saveAsRes.wopiParams) {
|
||||
outputData.setStatus('err');
|
||||
outputData.setData(constants.UNKNOWN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user