Skip to content
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

Add support for canceling resumable uploads #1813

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kawmra
Copy link

@kawmra kawmra commented Nov 16, 2024

Closes #1767

This PR adds support for canceling resumable uploads.
The implementation is based on the guides and observed behavior, as this functionality was not explicitly documented in the API references.

I'm new to Go, so please feel free to let me know if you have any concerns about naming conventions, code organization, or anything else.

Thanks for maintaining this great project!

Comment on lines +633 to +635
func (s *Server) deleteResumableUpload(r *http.Request) jsonResponse {
return jsonResponse{status: 499}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, if a non-existent session URI is specified, the server should return a 404, and a PUT request for a deleted session URI should respond with 499. However, since the upload process did not seem to specifically check whether the session URI actually exists, I decided to follow that approach and not pursue this level of reality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Canceling resumable upload is not supported?
1 participant