Skip to content

Commit

Permalink
Merge pull request dropzone#1369 from manu7691/master
Browse files Browse the repository at this point in the history
Add the possibility to set timeout on Options
  • Loading branch information
enyo authored Feb 18, 2017
2 parents fde770a + a8c127a commit 2df14f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dropzone.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class Dropzone extends Emitter
url: null
method: "post"
withCredentials: no
timeout: 30000 # timeout in milliseconds
parallelUploads: 2
uploadMultiple: no # Whether to send multiple files in one request.
maxFilesize: 256 # in MB
Expand Down Expand Up @@ -1132,7 +1133,8 @@ class Dropzone extends Emitter

uploadFiles: (files) ->
xhr = new XMLHttpRequest()

xhr.timeout = resolveOption @options.timeout, files

# Put the xhr object in the file objects to be able to reference it later.
file.xhr = xhr for file in files

Expand Down

0 comments on commit 2df14f3

Please sign in to comment.