Next.js Discord

Discord Forum

Best wat to store mp3 files (100mb+) until page reload?

Unanswered
piscopancer posted this in #help-forum
Open in Discord
I am developing an app that needs to be fed music files from hard drive (mp3/ogg...).
Currently I store these files on an input and create a temp a to download input.files when required.
<input id='songs' type='file' multiple accept='audio/*'/>

I want to know if storing a bunch of files which size reaches 100+mb is performance heavy. Where are these files even stored? I assume browser just stores a reference to files on the hard drive.
Also, I learned localStorage/sessionStorage are limited to 10/5mbs, I need far more.
I am also pretty sure it's a bad idea to store files as a variable because 100+mb of files are gonna be duplicated into the RAM
const files: File[] = // ...

Please, explain 🙏

0 Replies