Cannot Delete contents of a FileUploader

I have created a FileUploader and then an Image that deletes the contents of that fileUploader but it does not seem to work.

What am I doing wrong please?

Thanks.

I’m not sure if it’s the best way or not, but this is what I do.

On upload of the image I save the image to a set state, or just into the database somewhere and for step 2 I would reset inputs. Then I would just use the set state as the background image of the uploader. If you want to “delete” the image you just need reference the set state and make it blank. Poof, no more image.

Want to learn more?

www.nocodeminute.com

Presenting

I hope that helps.

Yes but this is not ideal, I want to save the value of the uploaded file so if I have 5 fileuploaders with one let s say I decide to delete it and have a blank value, I cannot find a way to delete that value of the specific uploader.

As the value of any images are dynamically taken from the fileuploader their values will not be available to save to the database on final confirmation( I will not have their i.e blank value as an available option to save to the database.

So instead of saving them from the file uploader you would be saving them from the set states, which would have the data you are looking for. Does that make sense? Let me know if you need more explanation. :blush:

This topic was automatically closed after 70 days. New replies are no longer allowed.