Member-only story

JavaScript Interview Question: What is a Blob?

Heloise Bahadiroglu
codeburst
Published in
4 min readMar 11, 2020

If you already enabled a user to download some file from your website, you probably came across the type Blob. You might have checked some example online and adapted them, not thinking twice about what this Blob thing was. As long as it works…

This kind of knowledge can show the difference between a Junior and a Senior developer. Or, as a Junior, would make you stand out as curious and eager to learn. Even if you are not preparing for an interview, having a clear and simple understanding of what a Blob is might help you understand what is going on next time you come across it in a middle of a complex code zipping some PDF files, so here we go:

Usage

To download some simple text you could do something like this:

For more complicated files on the other hand, this won’t be enough. If we want to download a PDF file we generated, we would have to do something like this (this example is using jsPDF):

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Heloise Bahadiroglu

Freelance Software Engineer. I write about web and cloud technologies. AWS and Azure certified.

Responses (1)

Write a response

Thank for that! great explanation!

--