readAsDataURL method

Reads a File or Blob object into memory as a data URL string.

Internet Explorer 10

Syntax

var dataUrl = FileReader.readAsDataURL(object);

Parameters

Pass one of the following:

object [in]

Type: File or Blob

dataUrl [out, retval]

Type: dataUrl

See below

Return value

Type: dataUrl

See below

Remarks

This method asynchronously starts reading the contents of the specified File or Blob object. When the read operation is complete, the readyState property is set to DONE and the onloadend event is fired. At that time, the result property contains a data URL string that encodes the file's data that was read.

See also

FileReader

 

 

Show:
© 2014 Microsoft. All rights reserved.