-
Notifications
You must be signed in to change notification settings - Fork 70
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
Possibility to Abort Upload Process at the Initial Event #221
Comments
Hi! You can call It seems like you wish to use the filename as the ID instead of the generated one. If so, you could write your own file id provider that uses the filename as the key: https://github.com/tusdotnet/tusdotnet/wiki/Custom-File-Id-Provider
You need to pass the data as a header back to the client as the tus protocol is very strict with the status code for the PATCH request that updates the file ( |
Hi! Thank you for all the suggestions. Looks like currently I am able to return the 204 response from the server with some info on the header. But I think I need to go check the events at the client-side because I've tried to capture the response on both onSuccess & onError but still unable to trigger the execution. |
Looks like trying to return the From what I understand, this happen because at the OnAuthorizeAsync, the FileId has yet to be generated.
|
Could you give me some code showing what you are trying to do? If you run FailRequest it will stop the execution of the current request. The error indicates that you used FailRequest with 204 as the status code. As 204 is a success code but there is no Location header returned (as you aborted the request) the client will consider this an error and fire the error event. |
Hi! I am back with another question!
As the name suggest, this time I would like to know if there a way we can abort the client-initiated upload progress from the tusdotnet side. For context, I currently trying to implement functionality to check at the initial event, if the proposed upload file is already exists on the destination then we skip the entire upload process and informed the client. Client will be using the tus-js-client.
Here I attach the relevant part for the server-side (tusdotnet 3.1)
The text was updated successfully, but these errors were encountered: