tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads
https://tus.github.io/tusd
MIT License
2.95k stars 467 forks source link

multiple post-receive invocations if doing more than one parallel uploads: built-in mechanism to get the "overall" offset? #1037

Closed geor-g closed 7 months ago

geor-g commented 7 months ago

I'm using tus-js-client with parallelUploads set to > 1, depending on the client connection. Accordingly, post-receive gets invoked multiple times. Each invocation only present the offset values of itself, which is expected, but also makes it tricky to get the "overall" offset, that is, the sum of all of them.

Is there any built-in way, as of now, to get the "overall" offset value?

Thanks so much for your work on both projects, tusd and tus-js-client.

Setup details (I believe these don't matter in the context of this question, but for completeness adding them here)

Acconut commented 7 months ago

There is no such feature in tusd (yet), although it has been requested a few times: https://github.com/tus/tusd/issues/268 and https://github.com/tus/tusd/issues/946. We might consider adding it in the future, since it is rather often requested.

Acconut commented 7 months ago

Is there any built-in way, as of now, to get the "overall" offset value?

Note that tus-js-client will be aware of the overall upload progress. Maybe that already helps for your application.

geor-g commented 7 months ago

Thanks -- I've built a mechanism which consists of post-receive feeding relevant information via a Unix socket towards a daemon, which does aggregation and further processing of the overall sums.

Works for me, closing this ticket. Please reopen if doing so makes sense.