When I delete a node containing a PDF file and PDFPreview-generated image, the PDF file was correctly removed, but the PDFPreview-generated image remains, and I can't delete it.

If I removed an attached file, or delete an node with an associated PDFPreview-generated image, shouldn't the image be removed too? Otherwise, how do I remove it?

Comments

juanjo_vlc’s picture

Assigned: Unassigned » juanjo_vlc
Priority: Normal » Major

Removing images is not implemented yet. I'm sure it has to be done on file deletion, so when you remove a file from a field, the corresponding preview is also removed.

I will set the priority to high.

iantresman’s picture

Thanks, that would be very useful. As a workaround, I am using the IMCE file manager to delete the image, as FTP will not let me due to incorrect permissions.

juanjo_vlc’s picture

Probably your drupal generated files have different owner because your web server is not running with the same user you use to upload your files, this is a very common problem on shared hosting. If you are concerned about security, try to open other users folders, if you didn't get a "open_basedir_resctriction" error, change hosting.

juanjo_vlc’s picture

Now images are removed when you remove the original file deleting the node or deleting the file from the node. It is archieved using hook_file_delete.

juanjo_vlc’s picture

Status: Active » Closed (fixed)

Now images are removed when you remove the original file deleting the node or deleting the file from the node. It is archieved using hook_file_delete.

iantresman’s picture

Excellent, I'll download the update and give it a try.