What is the purpose of blobs in JavaScript ?

Hello guys, I recently ran across the term "blob" in javaScript. I know it stands for 'Binary large objects' but concretely, what does it mean, why is it useful? Every files are stored as blobs? why? What is its usage?
11 Replies
glutonium
glutonium4w ago
GeeksforGeeks
JavaScript Blob - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
ἔρως
ἔρως4w ago
files mostly or chunks of binary data that arent text and must not be handled as text
Faker
FakerOP4w ago
yeah just read a bit about that, I understand it now, but why do we need it, like what would happen without blobs?
MarkBoots
MarkBoots4w ago
well, for example, with a blob format, you can store photo/videos or other files in a db. and if needed split into several chuncks
ἔρως
ἔρως4w ago
if you need to display an image from a file, you can create a blob object url and use that url instead
Faker
FakerOP4w ago
yep I did that, I want the image to appears every time I refresh the page, I need to work on the server-side.... still thinking of how I can do it
ἔρως
ἔρως4w ago
for previews of uploaded images, that can be incredibly useful thats something for #back-end
Faker
FakerOP4w ago
yep, if I don't figure it out, will post that in back-end :c
ἔρως
ἔρως4w ago
if it is php, its mostly easy
Faker
FakerOP4w ago
I'm working with node :c but nvm, if I don't know how to proceed, will revert back
ἔρως
ἔρως4w ago
alright, good luck
Want results from more Discord servers?
Add your server