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

ufku’s picture

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

MiMe’s picture

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...

nmc’s picture

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.

ufku’s picture

Version: master » 7.x-1.x-dev
Status: Active » Closed (fixed)

IMCE respects file usage while deleting files. Note that, adding the file link into content body does not make it in use.

laur3ntlapo’s picture

Is there a way to make IMCE mark a file inserted in the body as being used in the file usage table?