You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
There is one problem I am having while making a pascal client for tus.
I can successfully issue a POST to create a resource. It returns the resource location URL, which I checked and it returns a header "Upload-Offset:0". This is expected, because no data has been uploaded yet.
After that I send a PATCH and it starts uploading. If I interrupt the connection before it is finished, the HEAD call for the resource still returns "Upload-Offset:0", so no data has been saved and the upload can't be resumed. If I understand the protocol correctly, the offset should indicate the number of bytes that were transferred before the interruption.
If the connection is not interrupted, the upload finished properly and the Upload-Offset indicates the size of the upload.
I made several tests: with my client and with the Postman app, on the https://master.tus.io server and on a server running the official node.js implementation. All the results were the same.
The only conclusion that comes to mind is that I am not using chunked transfer mode. Is that a requirement for resuming?
The tus protocol is built upon the principles of simple pausing and resuming. In order to pause an upload you are allowed to end the current open request. The Server will store the uploaded data as long as no violations against other constraints (e.g. checksums) or internal errors occur.
There are no checksums sent and I don't think a simple disconnect would cause internal server errors.
Thanks for any advice on the topic.
The text was updated successfully, but these errors were encountered:
Hi
There is one problem I am having while making a pascal client for tus.
I can successfully issue a POST to create a resource. It returns the resource location URL, which I checked and it returns a header "Upload-Offset:0". This is expected, because no data has been uploaded yet.
After that I send a PATCH and it starts uploading. If I interrupt the connection before it is finished, the HEAD call for the resource still returns "Upload-Offset:0", so no data has been saved and the upload can't be resumed. If I understand the protocol correctly, the offset should indicate the number of bytes that were transferred before the interruption.
If the connection is not interrupted, the upload finished properly and the Upload-Offset indicates the size of the upload.
I made several tests: with my client and with the Postman app, on the https://master.tus.io server and on a server running the official node.js implementation. All the results were the same.
The only conclusion that comes to mind is that I am not using chunked transfer mode. Is that a requirement for resuming?
Here is the Postman PATCH request, for reference
There are no checksums sent and I don't think a simple disconnect would cause internal server errors.
Thanks for any advice on the topic.
The text was updated successfully, but these errors were encountered: