-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrying aws multipart upload doesn't work #4366
Comments
just to be sure, you're uploading a local file, right? not from a companion provider? linking a similar issue here #4356 - but I think it might be unrelated because that issue has to do with companion providers |
Yes, exactly, a local file. It's definitely an issue with the multipart companion. |
I tried to reproduce this issue using the UI, but retrying works for me. is the problem only when using the API? Also you say that:
I believe that addFile doesn't actually start an upload, but it just adds the file to the UI, so I'm not sure why your server would return a 500 in this case |
I am also encountering this issue when retrying failed multipart uploads. Is there a way of clearing the cache or some workaround? |
It does start the upload if you set I'm not sure what you mean by UI vs API. I'm using the library with my own UI but I don't think that should be a problem since a list of steps to reproduce is really straightforward without ~any UI. @snoobism as a workaround I copied the aws-s3-multipart code since it's quite small, then: In the async resetUpload(file) {
this.#cache.delete(file.data);
} Next, inside the const onError = (err) => {
this.uppy.log(err);
this.uppy.emit('upload-error', file, err);
this.resetUploaderReferences(file.id);
this.#companionCommunicationQueue.resetUpload(file); // <- this line is new
reject(err);
}; As far as I remember - that's it. Retrying works for me with these changes. |
Initial checklist
Link to runnable example
No response
Steps to reproduce
Calling
retryUpload(fileId)
doesn't actually try to call the server again, it just reuses last response.I'm not entirely sure if this #4313 is related or not.
In my case:
Then:
I found the problematic code is located in @uppy/aws-s3-multipart
index.js
file:The
cachedResult
contains a rejected promise so the logic above doesn't get past thatif
, it early returns.Expected behavior
The cache value should either be skipped or removed when
retryUpload
is called.Actual behavior
Retry doesn't actually retry anything, it just reuses last server response.
The text was updated successfully, but these errors were encountered: