Skip to content

Commit 3cbdd34

Browse files
qwIvanrstoenescu
authored andcommitted
feat: Upload component - allow custom name when uploading (quasarframework#472)
1 parent aa0dc31 commit 3cbdd34

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vue-components/uploader/Uploader.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ import Utils from '../../utils'
7777
7878
export default {
7979
props: {
80+
name: {
81+
type: String,
82+
default: 'file'
83+
},
8084
headers: Object,
8185
url: {
8286
type: String,
@@ -176,7 +180,7 @@ export default {
176180
177181
try {
178182
form.append('Content-Type', file.type || 'application/octet-stream')
179-
form.append('file', file)
183+
form.append(this.name, file)
180184
this.additionalFields.forEach(field => {
181185
form.append(field.name, field.value)
182186
})

0 commit comments

Comments
 (0)