Using Q-uploader
-
hi newbie here,
i just want to know if is it possible to create on your own method for uploading? i tried uploadfactory but it fails me. base on my understanding upload factory can be use to create on your own uploader so i made on my own but as ive said its not triggering my method…
here is my code:
<q-uploader url="" :upload-factory="uploadFactory" />
methods: { async uploadFactory (file, updateProgress) { let vm = this try { console.log('test') var data = { productImage: file, userId: vm.user._id } var uploadUserProfile = await UserService.UploadUserProfile(data) console.log(uploadUserProfile) } catch (err) { vm.$q.notify({ position: 'top', color: 'positive', message: 'Whoops! File upload fail.' }) } },
please help me to fix this thank you!