Delete image from folder

QuestionsDelete image from folder
Azhar Abdallah asked 8 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 8 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 8 years ago

Dear Abu Ghufran,

Thank you, its working.

Best regards,

Azhar

Your Answer

19 + 13 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?