Blob
Type
The Blob type is used to represent data. Its contents conform to the data URI standard
(RFC 2397).
Data is percent-encoded. Examples of valid data URIs are:
- an empty data URI:
data:, - a simple text string "Hello World":
data:,Hello%20World - a base64 encoded text string "Hello":
data:;base64,SGVsbG8= - an empty pdf file:
data:application/pdf;filename=empty.pdf;base64,
A Blob literal may be instantiated using blobOf().
Methods
filename
<function>
Retrieves the file name of this Blob, which is an empty string if none was provided.
Receiver
Blob
Returns
Text - file name of this blob, which could be an empty string
Usage
blobOf("data:filename=foo.txt;base64,SGVsbG8=").filename() == "foo.txt"
mimeType
<function>
Retrieves the mime type of this Blob. The mime type indicates the nature and format of the data in the blob.
Receiver
Blob
Returns
Text - mime type of this blob
Usage
blobOf("data:application/pdf;base64,").mimeType() == "application/pdf"