Rename
This commit is contained in:
parent
16a07c79f4
commit
19fd1b5ce4
|
@ -515,7 +515,7 @@ const ImageEditorOverlay = (props: IProps) => {
|
||||||
|
|
||||||
uploadManager.prepareForNewUpload();
|
uploadManager.prepareForNewUpload();
|
||||||
uploadManager.showUploadProgressDialog();
|
uploadManager.showUploadProgressDialog();
|
||||||
uploadManager.queueFilesForUpload([file], [collection]);
|
uploadManager.uploadFiles([file], [collection]);
|
||||||
setFileURL(null);
|
setFileURL(null);
|
||||||
props.onClose();
|
props.onClose();
|
||||||
props.closePhotoViewer();
|
props.closePhotoViewer();
|
||||||
|
|
|
@ -558,12 +558,11 @@ export default function Uploader(props: Props) {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const shouldCloseUploadProgress =
|
const shouldCloseUploadProgress = await uploadManager.uploadFiles(
|
||||||
await uploadManager.queueFilesForUpload(
|
filesWithCollectionToUploadIn,
|
||||||
filesWithCollectionToUploadIn,
|
collections,
|
||||||
collections,
|
uploaderName,
|
||||||
uploaderName,
|
);
|
||||||
);
|
|
||||||
if (shouldCloseUploadProgress) {
|
if (shouldCloseUploadProgress) {
|
||||||
closeUploadProgress();
|
closeUploadProgress();
|
||||||
}
|
}
|
||||||
|
@ -595,7 +594,7 @@ export default function Uploader(props: Props) {
|
||||||
uploadManager.getFailedFilesWithCollections();
|
uploadManager.getFailedFilesWithCollections();
|
||||||
const uploaderName = uploadManager.getUploaderName();
|
const uploaderName = uploadManager.getUploaderName();
|
||||||
await preUploadAction();
|
await preUploadAction();
|
||||||
await uploadManager.queueFilesForUpload(
|
await uploadManager.uploadFiles(
|
||||||
/* TODO(MR): ElectronFile changes */
|
/* TODO(MR): ElectronFile changes */
|
||||||
filesWithCollections.files as FileWithCollection[],
|
filesWithCollections.files as FileWithCollection[],
|
||||||
filesWithCollections.collections,
|
filesWithCollections.collections,
|
||||||
|
|
|
@ -339,7 +339,18 @@ class UploadManager {
|
||||||
this.uiService.setUploadProgressView(true);
|
this.uiService.setUploadProgressView(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async queueFilesForUpload(
|
/**
|
||||||
|
* Upload files
|
||||||
|
*
|
||||||
|
* This function waits for all the files to get uploaded (successfully or
|
||||||
|
* unsucessfully) before returning.
|
||||||
|
*
|
||||||
|
* @param filesWithCollectionToUploadIn The files to upload, each paired
|
||||||
|
* with the id of the collection that they should be uploaded into.
|
||||||
|
*
|
||||||
|
* @returns `true` if at least one file was processed
|
||||||
|
*/
|
||||||
|
public async uploadFiles(
|
||||||
filesWithCollectionToUploadIn: FileWithCollection[],
|
filesWithCollectionToUploadIn: FileWithCollection[],
|
||||||
collections: Collection[],
|
collections: Collection[],
|
||||||
uploaderName?: string,
|
uploaderName?: string,
|
||||||
|
|
Loading…
Reference in a new issue