I have a function that gets images from an array
onFileChange(e) { let files = e.target.files; for (let file in files) { this.files.push(URL.createObjectURL(files[file])); if (files.hasOwnProperty(file)) { console.log(files[file]); } } Which is triggered by this element:
<input multiple type="file" @change="onFileChange($event)"/> My data object for this component is:
data() { return { files: [], url: null, uploadedFiles: [] } When I render I get this error:
app.js:1920 Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
I am actually getting the file array. but with this error, help appreciated.