hono-tus
v1.1.0
Published
> **Note**: The project is currently in active development and is not suitable for production use. Please avoid using it yet. Version 2 will be stable enough for use.
Readme
hono-tus
Note: The project is currently in active development and is not suitable for production use. Please avoid using it yet. Version 2 will be stable enough for use.
To install dependencies:
bun installTo run:
bun run index.tsThis project was created using bun init in bun v1.3.3. Bun is a fast all-in-one JavaScript runtime.
Improvements:
- to me it looks like the adapters are not that useful in standalone and could be removed like redis adapter etc based on community feedback, because what are are the uses where we need to store files in the redis.
- it also seems like we could rename the hybrid adapter to RedisAndDiskAdapter and also add another RamAndDiskAdapter and also rename the MemoryAdapter to RamAdapter for even simpler understanding.
- i think the createTus function has app.use("*") which handles the cross-origin stuff, it should be dedicated to cors in hono, we should not handle it rather work with what the app configures.
- an attack could be possible(might not sure) if the server has maxSize of uploads to 5mb and if user uploads each of the chunks of 4.99 mb each then the maxSize is calculated during concatenation not during uploads, i am not sure. i think this can be fixed by limiting the chunk size to some number and validating that, i think it should exist in protocol.
- there could be a problem with checksum header splitting, it could expose itself as attack.
