You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,9 @@ Many of these props are inherited from [dropzone configuration so see their doco
83
83
| method | String | The HTTP method used to submit form file data. `Default:post`|
84
84
| capture | boolean | 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`|
85
85
| 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`|
86
+
| confirm | Function | A function for overriding native confirmation dialog box of browser. `Parameters: question, accepted, rejected`|
87
+
88
+
86
89
## Custom Dropzone preview template
87
90
88
91
> NOTE : Props like `thumbnailWidth,thumbnailHeight, useFontAwesome` will not work when you override the dropzone preview. No worry you can refer [demo file](demo/custom-dropzone-preview.vue) to achieve same. :) Don't forgot to add your styles in `<style>`
@@ -128,6 +131,7 @@ Events emitted by the component to the parent.
128
131
|------------|-------------|
129
132
| vdropzone-file-added(file) | File added to the dropzone.|
130
133
| vdropzone-files-added(file) | Files added to the dropzone.|
134
+
| vdropzone-file-added-manually(file) | Manually added file to the dropzone |
| vdropzone-error(file) | File uploaded encountered an error.|
133
137
| vdropzone-removed-file(file, error, xhr) | A file was removed from the dropzone.|
@@ -140,6 +144,22 @@ Events emitted by the component to the parent.
140
144
| duplicate-file(file) | Fired when duplicateCheck is enabled. |
141
145
142
146
147
+
## Listening to other Dropzone events
148
+
If you've referenced your tag with a ref property/tag as described in 'Using Methods', you can then access the Dropzone instance as well. This is useful if, for example, you want to add event listeners that have not been pre-configured (see below)
149
+
From your parent Vue instance:
150
+
```javascript
151
+
mounted () {
152
+
this.$refs.dropzone.dropzone.on('addedfile', function (file) {
153
+
if (this.files.length>1) {
154
+
this.removeFile(this.files[0])
155
+
}
156
+
})
157
+
this.$refs.dropzone.dropzone.on('maxfilesexceeded', function (file) {
0 commit comments