attachinary icon indicating copy to clipboard operation
attachinary copied to clipboard

How do I give user an option to remove image?

Open hemantsingal opened this issue 12 years ago • 3 comments

I am not sure how would I give an option to remove the image and I am unable to find it. Can someone help me out please?

hemantsingal avatar Aug 05 '13 08:08 hemantsingal

You can set the attribute to nil or just delete the associated Attachinary::File object.

https://github.com/assembler/attachinary/blob/master/lib/attachinary/orm/active_record/extension.rb#L22

maletor avatar Aug 06 '13 06:08 maletor

Right. But how do I give user the option in UI? Putting a button, which when clicked upon hides the image and set the field empty through javascript?

hemantsingal avatar Aug 06 '13 07:08 hemantsingal

User needs to click "Save" after removing the image from the form for the changes to take effect.

assembler avatar Aug 13 '13 09:08 assembler