I have a vue.js code to upload and delete files:
export default {
name: "FileUpload",
methods: {
addFile() {
if (this.multiple) {
let files = _.concat(
this.files,
Array.from(this.$refs[this.label].files)
);
this.$emit("update:files", files);
} else {
this.$emit("update:file", this.$refs[this.label].files[0]);
}
},
removeFile(idx) {
if (this.multiple) {
_.pullAt(this.files, [idx]);
this.$emit("update:files", this.files);
} else {
this.$emit("update:file", null);
}
},
}
}
What should I add to have the possibility to open uploaded files directly in the browser?