Uploader - url is required?
-
https://quasar.dev/vue-components/uploader#QUploader-API
tells me that url is not required
but this code<q-uploader :label="label" :multiple="multiple" class="full-width" auto-expand :auto-upload="autoUpload" :factory="uploadFactory" accept=".jpg, .png, .gif, image/*" ref="Uploader"> </q-uploader>
tells me
q-uploader: invalid or no URL specified
-
Did you pass a url in your factory?
-
uploadFactory(file) { let vm = this, data = new FormData(); return new Promise((resolve, reject) => { this.$axios.post('/upload', data, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(response => { resolve(file); }) .catch(error => reject(error)) }); }
-
Any suggestions?
-
@matroskin Im getting the same error. Did you solved the problem?
-
Nope… Maybe I should send issue?
-
Interesting… In my code above, I changed
resolve(file)
toresolve(null)
It works, axios sending and no errors in console