-
Notifications
You must be signed in to change notification settings - Fork 187
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
Implement async progress reporting for upload / assembly #214
Comments
thx @michaelstingl for asking about this |
@felixboehm I wonder if we can use websockets for clients and how this integrates with a push server ... maybe related appleboy/gorush#194 |
I think as a fallback, we'll always need pull/polling-based approach. But it would be cool to have the more fancy options too. |
AFAICT an upload has multiple phases:
The tus protocol only covers the first and second phase, transfer and assembly. When no preprocessing happens, we can return the etag and new fileid immediately. AFAICT we need to either extend the FinishUpload method of the tus backend implementations or register hooks that can start the preprocessing properly, keep track of progress and finalize the upload by making the file available to the user / moving it to the correct destination. postrocessing should not produce anything the clients need. But for all of this we need a workflow. AFAICT the client may not get a new etag until the upload has passed the finishing phase. |
as discussed, we'd need to invent a new TUS extension for async. |
@butonic want to keep this open? |
cc @dragotin This boils down to a state machine for uploads. Then file listings could return the state of a file as well: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
Please open again if the ticket is still relevant |
When finishing a large upload the assembly of a 40 GB file might take a long time. Currently, tus has no extension for this and the
concatenation
extension explicitly states:transloadit is mentioning the
/assembly
endpoint https://github.com/tus/tusd/wiki/Uploading-to-Transloadit-using-tus and also that it uses a socket.io server that can be used to track the progress: https://github.com/tus/tusd/wiki/Uploading-to-Transloadit-using-tus#getting-progress-and-more-events-over-web-socketsThe tusd handler has a hook mechanism that can be used to expose progress.
Or we could let clients make HEAD requests against the upload and return a read only progress property in the metadata ... as a quick hack ...
The text was updated successfully, but these errors were encountered: