DEV Community

Cover image for The Blob Data Type
Ian Iversen
Ian Iversen

Posted on

The Blob Data Type

There are varying data types that exist in the world of programming. Common data types include: strings, integers, floats, characters, booleans. All of these data types can be used along with tables and data to create rich and expressive databases for web apps. But what can developers do if they would like to use images, video, or audio?

ENTER type:blob

Image description

A blob data type is used for storing information in databases just like a string or an integer. However, blobs can store binary data which allows for the storage of files. Images, videos and audio can then be stored in databases as blobs.

The term "blob" actually stands for "Binary Large Object" and is used for storing information, as binary, in databases.

Through the use of blobs, common social media features such as photo albums can be constructed where a photo album table would contain photos:blob and photo_caption:string.

Because blobs are used to store objects such as images, audio files, and video clips, they often require significantly more space than other data types. The amount of data a blob can store varies depending on the database type, but some databases allow blob sizes of several gigabytes.


  "data" : {
    "image": "/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2===",
  "time": <Optional Timestamp>,
  "flowVersion": <Optional Workflow Version Name>
Enter fullscreen mode Exit fullscreen mode

Image description

How to record and play audio in JavaScript:

How can I get the blob file (i.e recorder voice) to send the server:

Image description


Top comments (0)