Permalink
Browse files

Allow dropzone and max file size to be set by config

  • Loading branch information...
1 parent 76653d6 commit 8fbb583851ccb7bd8421b78268ee5a88ab04866e @drewmca committed Apr 27, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 vendor/assets/javascripts/attachinary.js.coffee
@@ -48,9 +48,11 @@
initFileUpload: ->
options =
- maxFileSize: 10000000
+ maxFileSize: @config.maxFileSize || 10000000
dataType: 'json'
headers: {"X-Requested-With": "XMLHttpRequest"}
+ dropZone: @config.dropZone || @$input
+
if @$input.attr('accept')
options.acceptFileTypes = new RegExp("^#{@$input.attr('accept').split(",").join("|")}$", "i")

0 comments on commit 8fbb583

Please sign in to comment.