Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. URL
  4. createObjectURL()

URL: createObjectURL() static method

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

Note: This feature is available inWeb Workers, except forService Workers.

ThecreateObjectURL() static method of theURL interfacecreates a string containing ablob URL pointing to the object given in the parameter.

For more information, seeblob URLs.

To release an object URL, callrevokeObjectURL().

Note:This feature isnot available inService Workers due to itspotential to create memory leaks.

Syntax

js
URL.createObjectURL(object)

Parameters

object

ABlob (such as aFile) orMediaSource object tocreate an object URL for.

Return value

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

Examples

SeeUsing 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 byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp