Fixed #7180 - FileUpload shouldn't post to url if none is provided

pull/7197/head
tugcekucukoglu 2025-02-05 12:00:02 +03:00
parent 0158f03002
commit 41bbf66544
1 changed files with 9 additions and 7 deletions

View File

@ -222,16 +222,18 @@ export default {
}
};
xhr.open('POST', this.url, true);
if (this.url) {
xhr.open('POST', this.url, true);
this.$emit('before-send', {
xhr: xhr,
formData: formData
});
this.$emit('before-send', {
xhr: xhr,
formData: formData
});
xhr.withCredentials = this.withCredentials;
xhr.withCredentials = this.withCredentials;
xhr.send(formData);
xhr.send(formData);
}
}
},
clear() {