Jump to content


Is there any callback available when deleting an uploaded file (not 1 row data)?

delete callback upload

  • Please log in to reply
3 replies to this topic

#1 SilentSeth

SilentSeth

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 06 April 2013 - 09:04 AM

Hi all,

 

As stated in the title, is there any callback available when we delete an uploaded file? (Not deleting the data row, only the uploaded file).

 

Simply speaking, I create a thumbnail, and when I delete the original image, I want to delete the thumbnail as well.

 

Thanks. 



#2 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 06 April 2013 - 10:26 AM

As far as I am aware of, no there isn't one.

Probably you need to check with js for deletion of the uploaded file.

You can also make some procedure to be called ON update within your db.


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#3 SilentSeth

SilentSeth

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 08 April 2013 - 06:59 AM

I see.. noted that. Thank you for confirming. 



#4 Heyder

Heyder

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 05 January 2019 - 07:50 AM

I do not know whether it is right or not, but it worked for me.

Codeigniter/libraries/Grocery_Crud.php  line:1503

add line 

unlink("{$upload_info->upload_path}".'/thumb_directory/thumb-'."{$state_info->file_name}");

I have an original image example.jpg and in accordance with thumbnails thumb-example.jpg







Also tagged with one or more of these keywords: delete, callback, upload

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users