From the Firefox developer website, I know that Firefox uses
objectURL = window.URL.createObjectURL(file);
to get url of file type, but in
You could define a wrapper function:
function createObjectURL ( file ) {
if ( window.webkitURL ) {
return window.webkitURL.createObjectURL( file );
} else if ( window.URL && window.URL.createObjectURL ) {
return window.URL.createObjectURL( file );
} else {
return null;
}
}
And then:
// works cross-browser
var url = createObjectURL( file );