0

I am trying to create a form like the one we ask questions in, but with image & video Upload facility.
I am making Admin Support pages for a CMS. When the admin uploads an image, the name of the uploaded file can be seen in the textarea and the Image will be become visible on the customer pages.

After the file's usefullness, the admin may decide to remove the file from his webpage and deletes the link from his text box.
When that happens, the file will not be shown on the admin/user pages, but it still exists in my server.
How do I delete such useless files?
If you can find a way for the useless files to be deleted as the Admin deletes the links, it will be very helpful.

For a better understanding, checkout stackoverflow.com question form.

Edited by pritaeas: Moved to Web Development.

2
Contributors
2
Replies
20
Views
3 Years
Discussion Span
Last Post by phaneendrahari
0

Well if you have stored information about where these files are saved with your link, I guess you could retrieve this information when you delete the link, and delete the related files with it?

You can use the unlink() function for deleting files :).

0

Its not that simple. Have a look at the stackoverflow.com question form. YOu will get a better idea.
The solution is not that simple, or else I would have got it by now. :P

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.