|
@@ -1103,11 +1103,15 @@ class Uppy {
|
|
this.info(message, 'error', 5000)
|
|
this.info(message, 'error', 5000)
|
|
return Promise.reject(new Error(`onBeforeUpload: ${message}`))
|
|
return Promise.reject(new Error(`onBeforeUpload: ${message}`))
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
|
+ const { currentUploads } = this.getState()
|
|
|
|
+ // get a list of files that are currently assigned to uploads
|
|
|
|
+ const currentlyUploadingFiles = Object.keys(currentUploads).reduce((prev, curr) => prev.concat(currentUploads[curr].fileIDs), [])
|
|
|
|
+
|
|
const waitingFileIDs = []
|
|
const waitingFileIDs = []
|
|
Object.keys(this.getState().files).forEach((fileID) => {
|
|
Object.keys(this.getState().files).forEach((fileID) => {
|
|
const file = this.getFile(fileID)
|
|
const file = this.getFile(fileID)
|
|
-
|
|
|
|
- if (!file.progress.uploadStarted) {
|
|
|
|
|
|
+ // if the file hasn't started uploading and hasn't already been assigned to an upload..
|
|
|
|
+ if ((!file.progress.uploadStarted) && (currentlyUploadingFiles.indexOf(fileID) === -1)) {
|
|
waitingFileIDs.push(file.id)
|
|
waitingFileIDs.push(file.id)
|
|
}
|
|
}
|
|
})
|
|
})
|