How to clear an uploaded Image

0
Hi, I am on DM7.14.1, and I am using the MX ImageUploader widget. Once I upload an image, I cannot reset it; I can change it by browsing to another image, but I cannot browse to blank. How do I clear an uploaded Image? Tips appreciated, Guislain
asked
3 answers
1

Hi Guislain,

You can reupload a file using the widget and it will replace your  original file with the new file. If you want to just clear it, you could probably create a microflow that creates a new object (that you are using to store the image), use the copy attributes java action, and then delete the original object.

 

Hope this helps!

answered
0

Hi Austin,

Thanks for the suggestion.

Unfortunately deleting the image object will trigger cascade delete on children objects, so that would be problematic.

Having said so, I may need to:

  • not make the current object inherit from the image object,
  • create a twin object (1-1 relationship) which inherits from the image,
  • reset the twin (image) object via delete action

This may become an acceptable workaround, but I am surprised, that there are no actions to clear it.

Thanks for the suggestion,

Guislain

answered
0

Looks like you can do this with a bit of Java, based on a forum post from a few years ago:

https://forum.mendix.com/link/questions/5623

answered