-
Notifications
You must be signed in to change notification settings - Fork 101
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
Disallow offsets smaller than uploaded size #51
Comments
Marius clarified two concerns that I had about this elsewhere, will try to summarize here What about failed checksums?
What about uploading chunks in parallel?
+1 for me |
+1 Any concerns I have are solvable by hypothetical extensions, so I don't see why not. |
+1 I am all for making server implementations easier and this seems to be a sensible way to do so. |
Merged in #56. |
Citing the current spec for the
PATCH
request:In v0.2.2 of tus offsets smaller then the offset of the resource are accepted allowing clients to change already uploaded chunks of the resource. While this makes sense in some rare cases it hardens the server implementations. The problem is that the server must wait until everything is uploaded to start processing the resource because the client may change parts of the file. For example, a server may start converting a big video file right from the start allowing faster conversion and better resource usage.
Another point to consider is that streaming downloads of uploads are impossible if offsets smaller than the amount of already uploaded bytes.
If the client knows that parts of the file will change in the future they shouldn't be uploaded in the first place and only in their final state. The server should not to take care of that.
I suggest to change to specification to disallow this behaviour. In cases where the clients sends such values the request should be rejected returning a
409 Conflict
.The text was updated successfully, but these errors were encountered: