Created
October 2, 2017 21:29
-
-
Save robgcf/28cff10f52a8fc54d119f6104bbbdb9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here's the javscript: | |
var myDropzone = new Dropzone(".dropzone"); // this causes an error: "dropzone is already attached" | |
Dropzone.options.myDropzone = { | |
dictDefaultMessage: "Drop files here or Click to upload", | |
paramName: "file", | |
maxFilesize: 5 | |
}; | |
// without the var myDropzone above, this causes an error about myDropzone.on is not a function. | |
myDropzone.on("success", function(file) { | |
getUserFiles(); | |
}); | |
// Here's the HTML: | |
<form action="/whatever" class="dropzone" id="myDropzone"> | |
<input type="hidden" name="userid" value="1"> | |
</form> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment