Media type of the Blob expressed as MIME or "" if unknown.
Copies the blob into a file.
var myBlob = new Blob( 20 );
myBlob.copyTo( 'PROJECT/blob_copy.js' );
or
var myFile = new File( 'PROJECT/blob_copy.js' );
var myBlob = new Blob( 20 );
myBlob.copyTo( myFile );
var myFile = new File( 'PROJECT/bootstrap.js' );
myFile.copyTo( 'PROJECT/bootstrap_copy.js' );
or
var myFile = new File( 'PROJECT/bootstrap.js' );
var myFileCopy = new File( 'PROJECT/bootstrap_copy.js' );
myFile.copyTo( myFileCopy );
Destination file
true
to override existing file if any, false
otherwise
Creates a new blob by referencing the binary contents of the File to which it is applied, from start to end.
var myBlob = new Blob( 20 , 88, 'application/octet-stream' );
console.log( myBlob.toString() );
// XXXXXXXXXXXXXXXXXXXX
var mySlicedBlob = myBlob.slice( 5, 10 );
console.log( mySlicedBlob.toString() );
// XXXXX
var myBlob = new Blob( 20 , 88, 'application/octet-stream' );
console.log( myBlob.toString() );
// XXXXXXXXXXXXXXXXXXXX
var mySlicedBlob = myBlob.slice( 0, -5 );
console.log( mySlicedBlob.toString() );
// XXXXXXXXXXXXXXX
var myFile = new File( 'PROJECT/bootstrap.js' );
var myBlobSlice = myFile.slice( 0, 100 );
console.log( myBlobSlice.toString() );
(default: 0)
(default: blob.size)
Returns a buffer object containing a copy of the File bytes.
Get a string representation of the blob contents.
Size of the Blob in bytes.