Closed alireza2281 closed 3 years ago
You only need file
object from the fileRecord
for storage
I have setup a CodePen demo for you
onSelect(fileRecords) {
console.log('onSelect', fileRecords);
const fileRecordsToStore = fileRecords.map((fileRecord) => {
// only the file object is enough for storage
return {
file: fileRecord.file
};
});
}
Describe the bug I'm selecting file and store it in data of component or in store, and then navigate to other pages. when i come back to the page that file agent exists i restore the selected files to the file agent component the meta data of files would appear but the image itself wont show and when id checked the image preview tag the source is like this:
<img src="function () { [native code] }" class="file-preview-img">
To Reproduce 1.select image 2.store image data to store 3.navigate to any other pages 4.back to prev page 5.fill v-model of file agent component with data stored in store
the data store in store is like this:
Desktop (please complete the following information):