tus / tus-node-server

Node.js tus server, standalone or integrable in any framework, with disk, S3, and GGC stores.
https://tus.io/
MIT License
795 stars 197 forks source link

Allow hooks to override metadata #594

Closed Murderlon closed 4 months ago

Murderlon commented 5 months ago

Allow hooks to override metadata, only metadata not other Upload properties, in a backwards compatible way to precent breaking changes in the hook design. New metadata should probably be validated as well.

Acconut commented 5 months ago

In tusd, a pre-create hook can return a FileInfoChanges object, which allows the hook to customize a selected set of properties. Maybe this can serve as an inspiration for tus-node-server.