Skip to content

TagSpaces is an offline, open source, document manager with tagging support

KanBan perspective - add new file button

stanimirb516752f8251
diff --git a/app/services/platform-io.ts b/app/services/platform-io.ts
index bd8af2f60..2b98c9f38 100644
--- a/app/services/platform-io.ts
+++ b/app/services/platform-io.ts
@@ -16,7 +16,7 @@
*
*/
-import { Progress } from 'aws-sdk/clients/s3';
+// import { ManagedUpload } from 'aws-sdk/clients/s3';
import { Pro } from '../pro';
// @ts-ignore
import NativePlatformIO from './_PLATFORMIO_';
@@ -240,7 +240,7 @@ export default class PlatformIO {
content: any,
overwrite: boolean,
onUploadProgress?: (
- progress: Progress,
+ progress: any, // ManagedUpload.Progress,
response: any // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
) => void
): Promise<any> => {
@@ -252,7 +252,14 @@ export default class PlatformIO {
onUploadProgress
);
}
- return nativeAPI.saveBinaryFilePromise(filePath, content, overwrite);
+ return nativeAPI
+ .saveBinaryFilePromise(filePath, content, overwrite)
+ .then(succeeded => {
+ if (succeeded && onUploadProgress) {
+ onUploadProgress({ key: filePath, loaded: 1, total: 1 }, undefined);
+ }
+ return succeeded;
+ });
};
static deleteFilePromise = (