Answer the question
In order to leave comments, you need to log in
Does it make sense to store media files on the server as base64?
I am designing a simple homemade backend.
Does it make sense to store media files on the server as base64?
Do they do that?
Does it happen in life?
About a 30% increase in size I know - this is not a problem.
In what cases is it more convenient to use files and in what base64?
Answer the question
In order to leave comments, you need to log in
Base64 can only be used for transfer when files are "wrapped" in JSON or XML.
In other cases, it is better to store / transfer them as is.
Base64 - This is a format for transferring binary files as text, so the data "swells" a lot.
But this is sometimes needed when the receiving side expects text as input, not binary data.
What's the point? Why not write the file physically, but store it in the database? Then the base will be inflated, and very strongly. Plus, performance will suffer, since it will be necessary to encode this file first, and then decode it to the browser before outputting it. Basically, it's completely pointless.
This is only applicable for downloadable files, for ordinary assets - it really makes no sense
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question