1

Is there an example of the resize function for dropzone.js? I don't really understand how it works, it says: "Resize is the function that gets called to create the resize information. It gets the file as first parameter and must return an object with srcX, srcY, srcWidth and srcHeight and the same for trg*. Those values are going to be used by ctx.drawImage()."

But I don't really get how to use it. So far I'm resizing the images on server-side, but I'd like to do it client-side and I think this might help. Any other solutions using dropzone.js if not this one?

Alfredo Gago
  • 81
  • 1
  • 7
  • 1
    possible duplicate of [Dropzone.js + Client Side Image Resizing](http://stackoverflow.com/questions/20533191/dropzone-js-client-side-image-resizing) – Nathan Hughes Apr 29 '15 at 18:49

1 Answers1

-1

I believe the built-in resize function in dropzoneJS is what is used to create the thumbnail, not resize the photo client-side, per se. There might be some way you could leverage it by setting the thumbnail dimensions to what you want to save to the server, and overwriting the file being saved with the thumbnail, but I'd have to hack about for a spell to offer you any code suggestions for that.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
code-sushi
  • 719
  • 3
  • 7
  • 23