Parse Data URL

by @pixiebrix

Parse and decode a data: URL, e.g., from a file upload or screenshot


How to Use

No instructions provided yet. Have questions?
Ask the PixieBrix Community!


Inputs

Name Required Type Description
url string https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
decodeText boolean Decode the body into text

Outputs

Name Required Type Description
body string The body, decoded if decode flag was set
encoding string The encoding used to decode the body
mimeType string The MIME media type

@pixiebrix/data-url

Version

1.7.16

Created

Sept. 28, 2021

Updated

May 26, 2022