• Resolved Greg McEwan-Marriott

    (@gregthebuzz)


    When a user deletes an uploaded file from the frontend, the post gets deleted fine BUT the physical file still remains in the media upload folder…

    How do I delete the uploaded file when a user deletes the upload? I tried both wp_delete_attachment and unlink functions in php BUT file remains

Viewing 1 replies (of 1 total)
  • Plugin Author Anssi Laitila

    (@anssilaitila)

    Hi,

    When a user deletes a file, it is first moved to trash. After that, if an admin empties the trash or deletes just that file from there, the physical file is removed from the folder.

Viewing 1 replies (of 1 total)
  • The topic ‘Delete uploaded file when post delete’ is closed to new replies.