Display Below error in Safari.
Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
My Code is:
function createObjectURL(object) {
return (window.URL) ? window.URL.createObjectURL(object) : window.webkitURL.createObjectURL(object);
}
This is my Code for image:
function myUploadOnChangeFunction() {
if (this.files.length) {
for (var i in this.files) {
if (this.files.hasOwnProperty(i)) {
var src = createObjectURL(this.files[i]);
var image = new Image();
image.src = src;
imagSRC = src;
$('#img').attr('src', src);
}
}
}
}
createObjectURL(...)
function when you get that error? – Harounwindow.URL.createObjectURL('broken')
throws an error:Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
– FunnelJSZip.js
twice. – HymnalArrayBuffer
instead of aBlob
– Catfishfetch(...).then((response) => response.blob()).then(function(blob){var url = window.URL.createObjectURL(blob)})
tofetch(...).then((response) => { response.blob()} ).then(function(blob){var url = window.URL.createObjectURL(blob)})
, this error occurs. it should bethen((response) => { return response.blob()} )
or justthen((response) => response.blob() )
. – Uncouth