Shipped this project!
I made a file host!!
I had issues with existing solution
some include:
- max size is way too goddamn small
- needs accounts sometimes
- too complicated
I wanted something fast, simple, and usable, so I made it!
The hardest part of coming up and implementing the “tank quota” system
there were so many edge cases that had to be dealt with
- what happens if an upload fails?
- how do you prevent users from uploading files beyond their limits even though they “technically” havent used it yet?
- how do i stop people from uploading too many chunks
eventually i settled on a reservation system where a certain capacity (the file’s size) is reserved when you begin uploading, but that never actually touches your actual quota until you finalize the upload
chunks are never stored in the registry until an upload is finalized, so users cant half upload a massive file and write hundreds of chunks and then leave them there forever, they will get sweeped
I really like the tank system and im surprised i haven’t seen it before
another thing im proud of is the freaking slider component, i really like my slider component (kinda specific but whtvr)
ok thats enough yapping baibai
