Skip to content

Commit c1d3dfb

Browse files
buccferrstoenescu
authored andcommitted
Send raw file in QUploader. (quasarframework#1134)
1 parent 3c30499 commit c1d3dfb

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ test/unit/coverage/
88
test/e2e/dist/
99
cordova
1010
*.sublime*
11+
.idea/

src/components/uploader/QUploader.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ export default {
155155
multiple: Boolean,
156156
hideUploadButton: Boolean,
157157
hideUploadProgress: Boolean,
158-
noThumbnails: Boolean
158+
noThumbnails: Boolean,
159+
sendRaw: {
160+
type: Boolean,
161+
default: false
162+
}
159163
},
160164
data () {
161165
return {
@@ -321,7 +325,12 @@ export default {
321325
}
322326
323327
this.xhrs.push(xhr)
324-
xhr.send(form)
328+
if (this.sendRaw) {
329+
xhr.send(file)
330+
}
331+
else {
332+
xhr.send(form)
333+
}
325334
})
326335
})
327336
},

0 commit comments

Comments
 (0)