Replace image from input with Compressed one by Javascript?

I want to client-side compress an uploaded image, before sending it to the server, in order to save bandwidth and maximize upload speeds.  With the help of this JS compression library I’m already able to compress the image, but I’m not able to return the image back, so Mendix will pick it up.  Inside the console (of the browser, Chrome, I can see the reduced size being logged, but if I click next, to commit the object, I can clearly see the original file being transferred.  Does anyone has experience in this area and can help me out?
1 answers

Hi Sander,

How are you using this library? Did you build a custom widget? 

I would look into using the client api to commit your document. Check out the api.


Hope this helps!