We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 57cd9c4 + 09ec1eb commit 828b5b4Copy full SHA for 828b5b4
src/FileUpload.vue
@@ -744,7 +744,11 @@ export default {
744
for (let key in file.data) {
745
value = file.data[key]
746
if (value && typeof value === 'object' && typeof value.toString !== 'function') {
747
- form.append(key, JSON.stringify(value))
+ if (value instanceof File) {
748
+ form.append(key, value, value.name)
749
+ } else {
750
+ form.append(key, JSON.stringify(value))
751
+ }
752
} else if (value !== null && value !== undefined) {
753
form.append(key, value)
754
}
0 commit comments