Posted by mikeaja on May 1, 2012 at 4:57pm
4 followers
Jump to:
| Project: | ImageField |
| Version: | 6.x-3.9 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Is there a way to implement this, that someone can point me towards?
I'd like to setup a node edit form with a button to 'remove all' existing images. Is there an existing function, or best way to approach this, to make sure I find and remove the correct info?
Thanks
Comments
#1
Any idea?
#2
At this point, we probably won't be adding new features to ImageField module. Code-wise, you simply need to remove the items from the $node object and the corresponding files will be deleted upon calling node_save().
$node = node_load($nid);$node->field_image = array();
node_save($node);
#3
Automatically closed -- issue fixed for 2 weeks with no activity.