Comments (5)
Some HTTP frameworks I came across won't accept Content-Length values over a signed 32bit integer (2147483647 bytes, 2GB).
That seems client specific. But these clients could simply use 2GB as a chunk size instead of uploading the entire file during PUT requests?
On the other hand, the RFC mandates that the Content-Length header must be ignored if the transfer encoding is anything but identity (i.e. chunked transfer encoding):
The protocol currently says that Content-Length
is required, so it seems that in accordance with RFC 2616, transfer codings can't be used with the protocol at this point. Do you think we should support them?
from tus-resumable-upload-protocol.
But these clients could simply use 2GB as a chunk size instead of uploading the entire file during PUT requests?
I believe so, yes.
Do you think we should support them?
Supporting non-identity encoding will add some complexity to the server side so I think you guys should stick to the simplest possible for now.
I honestly don't agree with that RFC line. I understand that chunked transfer encoding is great when you don't know the size beforehand but going as far as making a non-identity transfer-encoding and Content-Length header mutually exclusive is just silly (but I'm sure they must have had their reasons...).
For instance, on Droplr the server is currently violating that rule as I always need to know the size of the file before allowing the upload (user may have no more space, file may be too large for the free accounts, etc). It was either that or not supporting chunked transfer encoding at all. Since this is to become a more widely used standard you'll need a more elegant solution.
from tus-resumable-upload-protocol.
@brunodecarvalho ^--- proposed change for v0.2. What do you think?
from tus-resumable-upload-protocol.
Sounds good. Just a sanity check to see if I'm following along:
- Client reports its going to upload a 5GB file
- Client PUTs two chunks of 2GB-1 (here you should probably return 202 ACCEPTED, reserve 201 CREATED/200 OK for the final response)
- Client PUTs final 1GB chunk and gets OK from the server
So, assuming there were no Content-Length limits, it'd be nearly the same as trying to upload a 5GB file at once with failures occurring at the 2 and 4GB boundaries (which would lead to retries but in this case are answered with "ok, got this chunk, proceed")... Yeah, this looks great!
from tus-resumable-upload-protocol.
@brunodecarvalho yup - that's how it works!
from tus-resumable-upload-protocol.
Related Issues (20)
- Future definition of the Tus-Resumable header HOT 10
- Spam: Nutt
- Spam: Nutt
- Request: Swagger / OpenAPI documentation of the API HOT 8
- Byte-range support for iOS compatibility HOT 2
- > net::ERR_UPLOAD_FILE_CHANGED HOT 2
- Body is not specified in OpenAPI HOT 1
- MIME-type Extension HOT 4
- Unable to resume uploads, Upload-Offset is always 0 HOT 1
- support http/3 HOT 1
- OWASP Considerations HOT 4
- > net::ERR_UPLOAD_FILE_CHANGED HOT 1
- Protocol version confusion HOT 2
- Upload Post-Processing HOT 13
- Ambiguous Tus-Concatenation specifications HOT 4
- Which StatusCode of response must server return, if server want to indicate a success HEAD request HOT 5
- How Can I learn about Tus V2? HOT 3
- Add extension to allow for discovery of existing upload URL HOT 4
- Upload-Metadata could be Structured Field Values (RFC 8941) HOT 3
- Support zero length uploads HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tus-resumable-upload-protocol.