-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
I'm using the aws-s3 plugin and trying to get Golden Retriever to work with a custom interface.
"@uppy/aws-s3": "4.3.2",
"@uppy/core": "4.5.3",
"@uppy/golden-retriever": "^4.2.3",The issue is that Uppy and Golden Retriever do not treat completed files as completed.
To reproduce:
- upload a bunch of files
- refresh the page when at least one file has completed
- retriever restores the state
- uploaded files can be marked as
isGhost = true - emit
restore-confirmedto continue upload - uppy restores the upload and start uploading
- the COMPLETED files are also restarted
- the
getUploadParameters/createMultipartUploadis called - completed files are uploaded again
Expected behavior
I would expect the files to be skipped completely when already completed (progress.uploadComplete = true). And not to have to re-select them because they are 'ghosts'.
Actual behavior
Currently they can be marked as isGhost = true which is annoying because now the user has to reselect files that have already been completed.
Additionally, the files are actually treated as completely new files and are uploaded again. That leaves me two equally useless options:
- Recycle the existing target (url/multipart). This breaks for multipart when it tries to re-upload already uploaded parts
- Restart the files completely. This completely voids the use of Golden Retriever for completed files and leaves me with a lot of extra uploaded/orphaned files that need to be cleaned up.
Possible solution
This could be handled at the #runUpload stage: skip files that have already completed
But also don't mark completed files as isGhost because that's just unnecessary.
There is one catch I can think of: if the file is needed in a postprocessing step it will have to be retrieved from wherever it was uploaded (I don't use postprocessors so not sure about the exact usage). But maybe that is similar to remote files? If you want to postprocess those you need them locally too somehow.