Kent C. Dodds
07/14/2021, 3:58 PM<audio />
src. I'm not sure whether there's another way to do that without creating an actual file.
The files are about 3 minutes long or so and I'll probably not store more than 100-200 at any given time, and they won't be written/read very often.
Anyway, I need to persist this to my Postgres db. I understand that base64 is a pretty poor way to store this data because it can be rather large. People have suggested I use a binary type and store it like that.
My question is, how do I serialize a base64
string as binary to store it in the db, and then deserialize it when it needs to be read.
Second related question, does anyone know whether there's another way I can do this to avoid base64 while still allowing me to use what's been recorded directly in an <audio />
Note a hard requirement is to not actually create files. That's just not going to happen here.
Hopefully that makes sense. Thanks for the help!Daniel Olavio Ferreira
07/15/2021, 9:09 AM