Skip to content

Commit 4baf46d

Browse files
committed
Added timeout prop. Fixes #137
1 parent cd95fec commit 4baf46d

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ Many of these props are inherited from [dropzone configuration so see their doco
7878
| resizeMimeType | String | The mime type of the resized image (before it gets uploaded to the server). If `null` the original mime type will be used. To force `jpeg`, for example, use `image/jpeg`. `Default : null` |
7979
| resizeQuality | Number | The quality of the resized images. `Default : null` |
8080
| resizeMethod | String | How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided. Can be either `contain` or `crop`. `Default : 'contain'` |
81-
| duplicateCheck | Boolean | Whether to check for duplicate file by file name. if true `duplicate-file` event will be emitted. `Default : 'false'` |
81+
| duplicateCheck | Boolean | Whether to check for duplicate file by file name. if true `duplicate-file` event will be emitted. `Default : 'false'` |
82+
| timeout | Number | The timeout for the XHR requests in milliseconds. `Default:30000`|
8283

8384
## Custom Dropzone preview template
8485

dev/bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue2-dropzone.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div v-if="ok">
77
<dropzone ref="myVueDropzone" id="dropzone" url="https://httpbin.org/post"
88
v-on:vdropzone-success="showSuccess"
9-
v-bind:dropzone-options="dropzoneOptions"
9+
v-bind:dropzone-options="dropzoneOptions"
1010
v-bind:use-custom-dropzone-options="true">
1111
</dropzone>
1212
<button @click="submitFiles()">Start Upload</button>

src/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@
124124
type : Number,
125125
default : 2
126126
},
127+
timeout:{
128+
type : Number,
129+
default : 30000
130+
},
127131
},
128132
methods: {
129133
manuallyAddFile: function (file, fileUrl, callback, crossOrigin, options) {
@@ -270,6 +274,7 @@
270274
resizeMethod : this.getProp(this.resizeMethod,this.dropzoneOptions.resizeMethod),
271275
uploadMultiple : this.getProp(this.uploadMultiple, this.dropzoneOptions.uploadMultiple),
272276
parallelUploads : this.getProp(this.parallelUploads, this.dropzoneOptions.parallelUploads),
277+
timeout : this.getProp(this.timeout, this.dropzoneOptions.timeout)
273278
})
274279
275280
// Handle the dropzone events

0 commit comments

Comments
 (0)