• Resolved Callum

    (@callumalden)


    Hello, thanks for creating this plugin. My question- is it possible to load further options for Dropzone, ideally I’d define them in a separate JS file:

    ie.
    dropzone.on(“dragEnter”, function() { console.log(‘do something’) });

    Rather than edit your wonderful code?

    I tried, loading a separate main.js file at the end of the template (after your plugin loads), with various dropzone.on functions… but I get ‘Uncaught ReferenceError: dropzone is not defined’.

    Perhaps you know the solution. I basically want to make a lot of customisations to the upload progress… which I currently have working great on a Vanilla Dropzone JS. Now I’m keen to migrate to your plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Callum

    (@callumalden)

    I think I have it, in my new JS file I use:

    Dropzone.prototype.on(“error”, function….. etc

    One question- setting top options like this does not seem to work, for example:

    Dropzone.prototype.options = {
    maxFiles: 1,
    acceptedFiles: ‘image/*’,
    dictInvalidFileType: ‘This form only accepts images.’,
    maxThumbnailFilesize: 99,
    thumbnailWidth: 800,
    thumbnailHeight: null
    };

    … this doesn’t seem to take effect. Is there another option to make these adjustments from a separate JS?

    Try like this: [wp-dropzone callback=”dragEnter: function() { console.log(file) }”]

    Thread Starter Callum

    (@callumalden)

    Nazmul, thank you very much!

    You’re welcome!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Extend Options’ is closed to new replies.