Skip to content

Commit c459af6

Browse files
authored
Merge pull request #182 from kishanmd/vue2
Added 'withCredentials' option override
2 parents 6b96e85 + a9c7459 commit c459af6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Many of these props are inherited from [dropzone configuration so see their doco
8484
| capture | String | If `null`, no capture type will be specified If `camera`, mobile devices will skip the file selection and choose camera If `microphone`, mobile devices will skip the file selection and choose the microphone If `camcorder`, mobile devices will skip the file selection and choose the camera in `video` mode On apple devices multiple must be set to false. AcceptedFiles may need to be set to an appropriate mime type `(e.g. "image/", "audio/", or "video/*")`. `Default:null` |
8585
| hiddenInputContainer | String | Element the hidden input field will be appended to. This might be important in case you use frameworks to switch the content of your page. `Default:body`|
8686
| confirm | Function | A function for overriding native confirmation dialog box of browser. `Parameters: question, accepted, rejected`|
87-
87+
| withCredentials | Boolean | Whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. `Default:false`|
8888

8989
## Custom Dropzone preview template
9090

src/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
method:{
136136
type : String,
137137
default : 'POST'
138+
},
139+
withCredentials: {
140+
type : Boolean,
141+
default : false
138142
}
139143
},
140144
methods: {
@@ -288,7 +292,8 @@
288292
timeout : this.getProp(this.timeout, this.dropzoneOptions.timeout),
289293
method : this.getProp(this.method, this.dropzoneOptions.method),
290294
capture : this.getProp(this.method, this.dropzoneOptions.method),
291-
hiddenInputContainer : this.getProp(this.method, this.dropzoneOptions.method)
295+
hiddenInputContainer : this.getProp(this.method, this.dropzoneOptions.method),
296+
withCredentials : this.getProp(this.withCredentials, this.dropzoneOptions.withCredentials)
292297
})
293298
294299
// Handle the dropzone events

0 commit comments

Comments
 (0)