Rename
This commit is contained in:
parent
16a07c79f4
commit
19fd1b5ce4
3 changed files with 19 additions and 9 deletions
|
@ -515,7 +515,7 @@ const ImageEditorOverlay = (props: IProps) => {
|
|||
|
||||
uploadManager.prepareForNewUpload();
|
||||
uploadManager.showUploadProgressDialog();
|
||||
uploadManager.queueFilesForUpload([file], [collection]);
|
||||
uploadManager.uploadFiles([file], [collection]);
|
||||
setFileURL(null);
|
||||
props.onClose();
|
||||
props.closePhotoViewer();
|
||||
|
|
|
@ -558,12 +558,11 @@ export default function Uploader(props: Props) {
|
|||
),
|
||||
);
|
||||
}
|
||||
const shouldCloseUploadProgress =
|
||||
await uploadManager.queueFilesForUpload(
|
||||
filesWithCollectionToUploadIn,
|
||||
collections,
|
||||
uploaderName,
|
||||
);
|
||||
const shouldCloseUploadProgress = await uploadManager.uploadFiles(
|
||||
filesWithCollectionToUploadIn,
|
||||
collections,
|
||||
uploaderName,
|
||||
);
|
||||
if (shouldCloseUploadProgress) {
|
||||
closeUploadProgress();
|
||||
}
|
||||
|
@ -595,7 +594,7 @@ export default function Uploader(props: Props) {
|
|||
uploadManager.getFailedFilesWithCollections();
|
||||
const uploaderName = uploadManager.getUploaderName();
|
||||
await preUploadAction();
|
||||
await uploadManager.queueFilesForUpload(
|
||||
await uploadManager.uploadFiles(
|
||||
/* TODO(MR): ElectronFile changes */
|
||||
filesWithCollections.files as FileWithCollection[],
|
||||
filesWithCollections.collections,
|
||||
|
|
|
@ -339,7 +339,18 @@ class UploadManager {
|
|||
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[],
|
||||
collections: Collection[],
|
||||
uploaderName?: string,
|
||||
|
|
Loading…
Add table
Reference in a new issue