Closed Nimesh-Soni closed 7 years ago
webkitURL.createObjectURL()
is only available in Safari 6.
URL.createObjectURL()
is only available from Safari 7.
See: https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL#Browser_compatibility
In safari 5.1, URL.createObjectURL(e.target.files[0]) is not working. also try
1)
if (window.URL !== undefined) { var url = window.URL.createObjectURL(e.target.files[0]); } else if (window.webkitURL !== undefined) { var url = window.webkitURL.createObjectURL(e.target.files[0]); } else { console.log('Method Unavailable: createObjectURL'); }
And 2)
var createObjectURL = (window.URL || window.webkitURL || {}).createObjectURL || function(){};