Download & Extend

hooks to prevent deletion of image if it is already in use

Project:IMCE
Version:master
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

currently used in imceimage - it would be very useful to prevent the file from being deleted if it is being used. Would it be possible to add hooks called before image deletion or updates?

If hook returns an error - then do not delete the image and display error message to user?

thanks.

Comments

#1

I can review and commit any kindly provided patch with pleasure. This may even go into the current branch.

#2

I think this is in the dev alreay.

But... I would really like to see a fix that allow a user to delete the files of the current node that they are editing.
At the moment I must edit the node, remove the files from the node body, save the node, re-edit and browse for the files in IMCE and then delete them...

#3

Following up on this. I'm surprised there hasn't been more interest. Does anyone have a workaround that they're using?

Currently using v7.x-1.4 and not finding this feature as being already available. I can remove files being used by the current node while editing the current node (before saving any file removal) - resulting in broken links.