Merge pull request #923 from ONLYOFFICE/bugfix/file-conversion
Bugfix/file conversion
This commit is contained in:
commit
26d4e5427f
@ -253,11 +253,13 @@ class UploadDataStore {
|
||||
|
||||
if (!this.filesToConversion.length) {
|
||||
this.filesToConversion.push(file);
|
||||
this.uploadedFilesHistory.push(file);
|
||||
if (!secondConvertingWithPassword && !conversionPositionIndex)
|
||||
this.uploadedFilesHistory.push(file);
|
||||
this.startConversion(t);
|
||||
} else {
|
||||
this.filesToConversion.push(file);
|
||||
this.uploadedFilesHistory.push(file);
|
||||
if (!secondConvertingWithPassword && !conversionPositionIndex)
|
||||
this.uploadedFilesHistory.push(file);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -399,13 +401,19 @@ class UploadDataStore {
|
||||
}
|
||||
|
||||
if (progress === 100) {
|
||||
if (!error) error = data[0].error;
|
||||
|
||||
runInAction(() => {
|
||||
const file = this.files.find((file) => file.fileId === fileId);
|
||||
|
||||
if (file) {
|
||||
file.error = error;
|
||||
file.convertProgress = progress;
|
||||
file.inConversion = false;
|
||||
file.action = "converted";
|
||||
|
||||
if (error.indexOf("password") !== -1) {
|
||||
file.needPassword = true;
|
||||
} else file.action = "converted";
|
||||
}
|
||||
|
||||
const historyFile = this.uploadedFilesHistory.find(
|
||||
@ -413,9 +421,13 @@ class UploadDataStore {
|
||||
);
|
||||
|
||||
if (historyFile) {
|
||||
historyFile.error = error;
|
||||
historyFile.convertProgress = progress;
|
||||
historyFile.inConversion = false;
|
||||
historyFile.action = "converted";
|
||||
|
||||
if (error.indexOf("password") !== -1) {
|
||||
historyFile.needPassword = true;
|
||||
} else historyFile.action = "converted";
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user