tus-node-server icon indicating copy to clipboard operation
tus-node-server copied to clipboard

Call `POST-RECEIVE` while streaming instead of when PATCH is finished

Open stormbard opened this issue 2 years ago • 6 comments

Unless I'm missing something there doesn't seem to be a hook or event to track upload progress server side. tusd has a hook called post-receive which allows you to log upload progress. Is there a way with tus-node-server to do something similar?

More info on use case. I'm using tus to upload the files. Once the upload is complete I will pass it off to another service to do the post processing and final storage. I'd like to have a task tracking wrapper to alert the user to the upload and post processing progress.

stormbard avatar Dec 08 '23 16:12 stormbard

Hi, we have POST_RECEIVE too.

Murderlon avatar Dec 11 '23 09:12 Murderlon

In my experience this is only triggered once the PATCH call is completely finished and not as the upload is streaming. So it can't be used to track the upload as it is happening.

stormbard avatar Dec 11 '23 14:12 stormbard

Any news?

AlimovSV avatar Feb 01 '24 07:02 AlimovSV

We can look into changing the behaviour of POST_RECIEVE, to align with tusd, but that would be a breaking change so that's going to have to wait for a bit. I don't think it make sense to introduce another event in the meantime.

Murderlon avatar Feb 01 '24 08:02 Murderlon

Any updates?

AlimovSV avatar Apr 18 '24 08:04 AlimovSV

A new major version is not coming any time soon, ideally as long as possible, and this is a breaking change.

One option is to introduce POST_RECEIVE_V2 to keep backwards compatibility.

Murderlon avatar Apr 18 '24 09:04 Murderlon

@Murderlon Please release this change, thank you.

AlimovSV avatar May 10 '24 16:05 AlimovSV