• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete image permanently from upload folder.

#1
Hi,

I have a website & sometimes need to delete & update records from the site. Several records in many tables has image and we upload image to add a new record. But I am not sure whether should we delete the images permanently whenever delete the corresponding records.

Thanks
Hamid Khan
Reply

#2
@hamid,

suggestion...you could just flag the record/image in the table and not show it and if you change your mind later you could just delete all flagged records. I would only discourage keeping old images if hosting space becomes an issue.
Reply

#3
Code:
table field for soft deletes

deleted tinyint(1) not null default 0,


deleted = 1 image is deleted do not show.
deleted = 0 image is ok so show it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#4
@ php_rocs
@ InsiteFX

Thanks lot for your great suggestions.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.