Upload file, then canceled input, but file already in DB
Upload file, then canceled input, but file already in DB
For this example: https://editor.datatables.net/examples/advanced/upload.html
When a user uploads a file, an entry is made in the "files" table and the file is stored in the system directory.
If the user completes the remainder form and submits it then the remaining data is saved to the "users" table and all is well.
However if the user uploads the file and then cancels the edit, the record of the upload stays in the "files" table and the file itself stays in the system directory since nothing tells the server-side Editor to do anything.
Granted it should be cleaned up the next time the form is properly submitted (assuming dbClean is used), but is there something that's suppose to delete the record from the "files" table if the edit was canceled?
This question has an accepted answers - jump to answer
Answers
No. Because the cancellation is a client-side action, and there is nothing to tell the server that the edit has been cancelled, it doesn't know that the edit is no longer active. In the absence of that, the next dbClean will do the tidy up.
Allan
Thanks, @allan -- just verifying my understanding is correct!