tusd icon indicating copy to clipboard operation
tusd copied to clipboard

Blocking hook to customize upload metadata / id

Open quality-leftovers opened this issue 2 years ago • 2 comments

Hello,

we are considering using tusd as storage frontend and did some thinking about what we're currently missing feature wise.

What we came up with was that we'd like to have the ability to set

  • upload ID
  • and Metadata

using a blocking hook.

While this could be done using a custom storage implementation or an HTTP proxy/middleware we really like how the hooks in the cli application allow for external validation using a simple REST microservice.

I did play around with the tusd today a bit and added a simple hook implementation, but wanted to find out if this feature makes sense in your eyes and whether you'd be interested in a PR. Just picked up golang yesterday, though :)

quality-leftovers avatar Aug 04 '22 15:08 quality-leftovers

Oh I've browsed the branches and it seem feat/new-hooks actually implements the ability to override request headers. I'll have a look at v2 branch and possibly close this issue :)

quality-leftovers avatar Aug 10 '22 10:08 quality-leftovers

You are correct. In v2 of tusd we will ship an overhauled and more powerful hook system. It is already able to modify response headers and in the future we want to add the feature to modify the upload ID. Would that already satisfy your needs?

Acconut avatar Aug 10 '22 10:08 Acconut

I've started playing around with the hooks a bit and it looks very good so far => /close.

Thanks :)

quality-leftovers avatar Aug 17 '22 14:08 quality-leftovers