readAsBinaryString method

Reads the contents of a Blob or File as raw binary.

Syntax

var retval = FileReader.readAsBinaryString(blob);

Parameters

blob [in]

Type: Blob

Return value

Type: HRESULT

This method can return one of these values.

S_OK

Remarks

Used to start reading the contents of a specified Blob or File. If the read request was successful, readyState becomes DONE and the loadend event is fired. At that time, the result property contains the raw binary data of the file.

Because readAsBinaryString returns raw binary data, it can be used to ready any file type.

See also

FileReader

 

 

Show: