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
https://www.geeksforgeeks.org/javascript-blob/
https://www.oreilly.com/library/view/javascript-the-definitive/9781449393854/ch22s06.html#:~:text=A%20Blob%20is%20an%20opaque,of%20a%20small%20text%20file.
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.
O’Reilly Online Learning
JavaScript: The Definitive Guide, 6th Edition
files
mostly
or chunks of binary data that arent text and must not be handled as text
yeah just read a bit about that, I understand it now, but why do we need it, like what would happen without blobs?
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
if you need to display an image from a file, you can create a blob object url and use that url instead
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
for previews of uploaded images, that can be incredibly useful
thats something for #back-end
yep, if I don't figure it out, will post that in back-end :c
if it is php, its mostly easy
I'm working with node :c
but nvm, if I don't know how to proceed, will revert back
alright, good luck