Level 14
Hi try like this.
import Dropzone from 'dropzone';
export defalut {
Dropzone.autoDiscover = false;
methods: {
initDropzone: function() {
new Dropzone("#id", {
paramName: "profile_picture", // The name that will be used to transfer the file
maxFilesize: 1,
uploadMultiple: false,
acceptedFiles: 'image/*',
maxFiles: 1,
headers: {'X-CSRF-TOKEN' : $('meta[name="token"]').attr('value')},
init: function() {
// initial hook
},
success: function(file, response){
// success hook
}
});
}
}
}
1 like