Skip to content

Commit

Permalink
Merge pull request dropzone#699 from VivintSolar/master
Browse files Browse the repository at this point in the history
Added support for mobile capture attribute
  • Loading branch information
enyo committed Sep 18, 2014
2 parents 4fef9be + 479e7fc commit 90a62f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dropzone.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ class Dropzone extends Em
# If false, previews won't be rendered.
previewsContainer: null

# 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/*").
capture: null

# Dictionary

Expand Down Expand Up @@ -523,6 +530,7 @@ class Dropzone extends Em
@hiddenFileInput.className = "dz-hidden-input"

@hiddenFileInput.setAttribute "accept", @options.acceptedFiles if @options.acceptedFiles?
@hiddenFileInput.setAttribute "capture", @options.capture if @options.capture?

# Not setting `display="none"` because some browsers don't accept clicks
# on elements that aren't displayed.
Expand Down

0 comments on commit 90a62f4

Please sign in to comment.