Create Resize MF

Hi everyone, I'm new in Mendix and microflows are little bit difficult right now. I'm  developing an app. When the user adds an attachment, it should be resized to the maximum size of 30MB. I've created a flow and used imagecrop javaactions, but I'm not able to resize the file. Can someone help me further? I'm not sure if I'm doing something wrong here.  
1 answers

Setting the compression quality to a lower value should help in reducing file size, but as I see from this post it does not always work

If you need to ensure that the file size is always below a certain size you might need to implement a java action for this. A plain java implementation of this is explained here:

You will need to implement the code in a java action to use this in your app.