split upload directories
See original GitHub issuehey guys…like the idea of tus and resumable uploads because connections are really sluggish here in perú at times…even wired connections 👍 even though at least the node server looks a little abandoned at the moment?!
am i correct that it used to support koa.js? does it still? and what version?
now to the topic, i’m splitting my upload directory in incremented folders [1, 2, 3, …] to reduce number of files in a single folder how can i do this using tus-node? how to create a new directory if specified limit reached? maybe checking file count on upload complete and then just passing new dir to fileServer.datastore.path ?
and I’m not yet sure how serving those files work…i can just serve them using koa of course but i try to understand tus and custom get handlers
so right now opening the url of an uploaded file won’t do anything besides logging
handle: GET /files/726e2c46be5fd77c4b8661f0a1cec62a
any input appreciated 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
For anyone that ends up here in the future curious about koa support. You’ll need to use the following as using koa-connect directly doesn’t work due to inconsistencies in how the Server#handle method works.
It is also important to know that your API path and your FileStore path need to be the same! If they are different you’ll run into issues where the final PATCH will fail even though the file was successfully uploaded. I haven’t found a way around this or determined why it happens. Although, it seems like a bug to have a dependency like that.
Sounds good 😃 I am going to close this issue now as it seems your questions are answered. Feel free to open a new issues if further problems arise.