Forums
This topic is locked
Delete Image when Record is Deleted?
06 Mar 2003 09:01:00 A H posted:
We've got all these great behaviors to upload images but what about deleting them? I've got a few sites that use pure asp upload and i'm about to buy pure php upload for a few more. Some clients sites are starting to get a bit heavy on disk usage due to the images that are no longer required on the server.
Any chance of a hand writing a script that will delete image using the filename in the record when the record is deleted? Thanks.
Replies
Replied 07 Mar 2003 01:36:46
07 Mar 2003 01:36:46 Robert Kruse replied:
The PHP command "Unlink" will delete a file, so just use that right before you delete the record.
Proper usage found here:
www.php.net/manual/en/function.unlink.php
Proper usage found here:
www.php.net/manual/en/function.unlink.php
Replied 07 Mar 2003 01:41:40
07 Mar 2003 01:41:40 A H replied:
Great thanks. How about ASP?
Replied 07 Mar 2003 14:21:44
07 Mar 2003 14:21:44 Tim Green replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Great thanks. How about ASP?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
You'de probably be better asking this question in a different forum. PHP only here please.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Great thanks. How about ASP?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
You'de probably be better asking this question in a different forum. PHP only here please.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 13 Mar 2003 18:48:44
13 Mar 2003 18:48:44 Robert Kruse replied:
This tutorial will explain how to delete a file while using an update form or a delete form in conjunction with PureASPUpload 1 & 2.
www.dmxzone.com/ShowDetail.asp?NewsId=1938
www.dmxzone.com/ShowDetail.asp?NewsId=1938
Replied 13 Mar 2003 19:09:42
13 Mar 2003 19:09:42 Martha Graham replied:
We are working on an add on pack for the pure php upload as well. So you can delete the files.
Martha Graham
Martha Graham
Replied 13 Mar 2003 22:43:00
13 Mar 2003 22:43:00 A H replied:
Thats great. Thank you.
Replied 16 Mar 2003 13:14:05
16 Mar 2003 13:14:05 Interakt Online replied: