-
Notifications
You must be signed in to change notification settings - Fork 479
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
Re-uploading the same file will not trigger a hook event. #348
Comments
I found a solution, which is to delete the file after processing it. |
Hello, We have the same problem. Given that deleting the file may not succeed (e.g. backend failure), it is necessary to re-emit this event when the file has been fully downloaded. |
I would also like to add that it is not possible to delete the file before uploading it because it would defeat the resumable nature of’ the upload... |
This is not a problem with the tus server but your client, which likely has a setting enabled that it will not reupload a file that it has already uploaded. For example, if you are using tus-js-client look at the |
Hi Marius, Here are the settings we use:
The use case is the following:
Thank you for your attention. |
@tuscland Please look into the |
Sounds great.. I will, thank you! |
While removeFingerprintOnSuccess does work, it would be great to have the ability to re-trigger the completion hooks in one way or another. When uploading 100gb files, it can be a touch bit demoralizing if an API failure forces a full restart of the upload. |
How do you mean that? API failure in the sense that the API which consumes the uploaded file fails and needs to be retried? |
Yep, that would be the case. TUS will have the full file with all bytes uploaded, but if the API fails to consume the hook we have no choice but to have the user restart since we can't get the hook to refire. Of course the API should be more reliable for consuming the hooks, but for files that take hours to days to upload, seems like it could stand to be more fail-tolerant |
tusd will retry hooks if they fail. At least for HTTP and gRPC hooks, I think. So if you bubble up the error from inside your hooks, then it should be rare that an uploads fails due to this. |
Closing this since the question has been answered. |
I uploaded the file for the first time and received the json data of the hook event correctly.
After I refreshed the page and uploaded the same file again, no hook event occurred.
The text was updated successfully, but these errors were encountered: