-
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
Max Request Size (Chunk size) #353
Comments
Interesting idea but I don't fully understand what you are proposing.
What you that flag actually do? How should a server "enforce this value"?
For smaller uploads, it's a benefit that no negotiation is necessary as that would decrease performance. For bigger uploads, that's neglectable but we have to keep all scenarios in mind. |
A header to describe the maximum allowed chunk size, something like this: tusd/pkg/handler/unrouted_handler.go Lines 242 to 245 in 43bd4b0
Like it does for the tusd/pkg/handler/unrouted_handler.go Lines 327 to 330 in 43bd4b0
I know, the best scenario will always be a single request with the whole file, but how can you do that if you are using a CDN that has strict limits? like Cloudflare that limits upload size (HTTP POST request size) with a 100mb hard limit. When I say negotiate, I mean before the upload starts the client (uppy for example) just query the server about their limitations (max file size, max chunk size, etc). (Option #1) (or) For example: You could set on your Otherwise, what happens now without this proposal is: I hope that my intention is clearer now. |
Yes, thanks for the detailed response, @navossoc! We had proposal for the tus protocol to add Tus-Min/Max-Chunk-Size headers over at tus/tus-resumable-upload-protocol#93 but never followed through with it since it was not apparent for us whether this is actually needed. Maybe you can comment over there. Regarding the adding the limit to tusd and the query functionality to tus-js-client etc, we are always open for PRs. Let me know if you need any help there. |
Problem:
As described on: https://github.com/tus/tusd/blob/master/docs/faq.md
Sometimes we can't change these values and we need to deal with these limitations ourselves.
Propose:
It would be great if we can chunk requests smaller than the upload thresholds.
Describe alternatives you've considered
Sure, we can implement this on the client like (uppy), but shouldn't the server enforce this value?
I mean we have
-max-size
, why not something like-max-chunk
?This will allow the server to negotiate with the client a reasonable value.
Otherwise we will receive a
413 Request Entity Too Large
(Cloudflare for example) and the upload will just fail.Can you provide help with implementing this feature?
I think we have all it's needed to easy implement it.
It is only necessary to discuss the idea to see if there is any problem with it.
Let me know what you guys think about it.
The text was updated successfully, but these errors were encountered: