Photo by Kasturi Roy on Unsplash

Member-only story

JavaScript Blob Object Explained…

Inbuilt object that represents a file-like object of immutable, raw data.

Yadav, Niteesh
codeburst
Published in
3 min readApr 9, 2020

Blobs are immutable objects that represent raw data. This data isn’t necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user’s system.

Blobs are used for many things -

  • They can be created from content from the network.
  • They can be saved to disk or read from a disk.
  • They are the underlying data structure for File used in the FileReader API, for example.

We can construct Blob from other non-blob objects and data, use the Blob() constructor.

Blob Constructor

The Blob Constructor allows one to create blobs from other objects. For example, to construct a blob from a string.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>…

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 Yadav, Niteesh

Thinker || Writer || Avid Reader || Technical Enthusiast

No responses yet

Write a response

Recommended from Medium

Lists

See more recommendations