Delete image from folder

QuestionsDelete image from folder
Azhar Abdallah asked 2 years ago

Hi Abu Ghufran,

I'm using the upload file grid. When you delete the entire row, the image is also removed from the folder. But when you click the edit from the toolbar, and press delete to delete the image, only the link is deleted from table and the image file is still in the folder.

Is there anyway to delete the image from the folder when using edit options.

Your kind answer will be highly appreciated.

Best regards,

Azhar

2 Answers
Abu Ghufran answered 2 years ago

You need to connect on_update event handler, fetch the old path using the passed row ID and remove file from FS.

Azhar Abdallah answered 2 years ago

Dear Abu Ghufran,

Thank you, its working.

Best regards,

Azhar

Your Answer

10 + 4 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!