I run “tus” as a resumable upload server and I must upload user’s files for her or his dedicated folder. Can I change tus source code to add a header field with “uploadDirectory” location? which source code file include this part of upload process?
Hi there,
what server software are you using? If it’s tusd (https://github.com/tus/tusd), then you do not need to change any of its source code but use the integrated Hook System (see https://github.com/tus/tusd/blob/master/docs/hooks.md for more information). You can add the desired upload directory to the upload’s meta data and then move the file to its final location inside a post-finish hook (https://github.com/tus/tusd/blob/master/docs/hooks.md#post-finish).
I hope this helps.
1 Like