简体   繁体   中英

Configuring Dropzone.js

So I'm new to dropzone.js and I have a simple html page. When I drag and drop files it looks like I'm able to do it. However, now I want to further configure this with some options like "clickable" , "addRemoveLinks", and "dictDefaultMessage".

I've looked for samples, can somebody tell me what I'm doing wrong here ? It doesn't appear to care about the configurations I've put in my javascript. Any direction or suggestions would be most appreciated.

 <!DOCTYPE html> <html> <head> <script src="Dropzone.js"></script> <script> Dropzone.options.myAwesomeDropzone = { paramName: "file", // The name that will be used to transfer the file maxFilesize: 8, // MB clickable : true, uploadMultiple :true, addRemoveLinks:true, dictRemoveFile="Remove File", dictDefaultMessage="Hey Yo" }; </script> <meta charset="UTF-8"> <title>Title of the document</title> </head> <body> <form action="/file-upload" class="dropzone" id="myAwesomeDropzone"> </form> </body> </html>

Jason

Dropzone script and your custom script to working with Dropzone must be included in the head section. so that they would load before every element. Else you can't combine configuration and auto capture together.

This help me unstuck myself when i go hooked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM