QUploader fails even AFTER promise is resolved and @fail event is triggered (the progress bar is red in color and stuck at 99% if updateProgress is set to 1).
<q-uploader
:url="url"
:upload-factory="uploadFile"
:send-raw="true"
:headers="{ 'content-type': 'application/x-www-form-urlencoded' }"
:no-content-type="true"
@add="uploadFileAdded"
@start="uploadStarted"
@finish="uploadFinished"
@uploaded="uploadedFile"
@fail="uploadFailed"
color="orange"
text-color="black"
auto-expand
extensions=".csv"
inverted-light
float-label="Upload List"
:multiple="false"
:hide-upload-button="false"
:hide-upload-progress="false"
:clearable="true"
/>
uploadFile(file, updateProgress) {
return new Promise((resolve, reject) => {
resolve("Hi");
});
},
After careful reading, finally solved it.
The Upload factory needs to return the uploaded file.
uploadFile(file, updateProgress) {
return new Promise((resolve, reject) => {
resolve(file);
});
},