Jump to content
Sign in to follow this  
MGLP

Delete an Uploaded File???

Recommended Posts

The Input tag type="file" ... will upload a file but how do we delete such uploaded files?

When my user deletes his record (which contains the path/name to his uploaded file) from my database, I want to delete his file also.  But I have absolutely no idea how to do it.  I am totally baffled!

Thanks for the much needed help.

Share this post


Link to post
Share on other sites

The input tag does not save the file on the server, it just transmits the file data across the internet. The actual saving of the file is being done by server-side code that you wrote. You write the software that saves files and keeps track of them. When you delete a record from the database, the record needs to provide information about the location of the file on the server. Before deleting the record, find this information and use it to delete the file.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×