MGLP Posted May 3, 2018 Share Posted May 3, 2018 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. Link to comment Share on other sites More sharing options...
Ingolme Posted May 3, 2018 Share Posted May 3, 2018 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. 1 Link to comment Share on other sites More sharing options...
MGLP Posted May 4, 2018 Author Share Posted May 4, 2018 Absolutely. I should have know. Many thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now