URL: createObjectURL() static method - Web APIs | MDN

Syntax

js

URL.createObjectURL(object)

Parameters

object

A Blob (such as a File) or MediaSource object to create an object URL for.

Return value

A string containing an object URL that can be used to reference the contents of the specified source object.

Examples

See Using object URLs to display images.

Specifications

Specification
File API
# dfn-createObjectURL

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.