diff --git a/README.md b/README.md index e38e95b..dd67c6e 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ > A drag and drop multiple file uploader component that uses Vue.js v2 and Axios. Uploader shows file names, sizes and total size of files added. It also allows setting a minimum required number of files to upload. +### About this fork by Chupzzz + +Original component by *updivision* worked fine except of *successMessagePath/errorMessagePath* props and *upload-success* event - all of them wasn't working properly. So this fork has this issues fixed. Pull request to updivision has been sent. + ### Demo See live demo [here](https://updivision.github.io/vue2-multi-uploader/). diff --git a/src/MultipleFileUploader.vue b/src/MultipleFileUploader.vue index 95319aa..6a3630e 100644 --- a/src/MultipleFileUploader.vue +++ b/src/MultipleFileUploader.vue @@ -227,13 +227,14 @@ export default { this.isLoaderVisible = false; // Show success message if(this.showHttpMessages) - this.successMsg = response + "." + this.successMessagePath; + this.successMsg = response.data[this.successMessagePath]; this.removeItems(); + this.$emit('upload-success', response); }) .catch((error) => { this.isLoaderVisible = false; if(this.showHttpMessages) - this.errorMsg = error + "." + this.errorMessagePath; + this.errorMsg = error.data[this.errorMessagePath]; this.removeItems(); }); } else {