There are some links on my site.
When these links are clicked, I serve the files with php.
When the download is finished, I delete the file and cancel the links.
If the user's browser opens the save as dialog window, the file starts downloading in the background.
The problem occurs here. If the user presses the cancel button in the save as dialog window and the file is currently downloaded in the background, the file is downloaded and deleted. However, the user does not actually download the file. The file goes to the tmp folder.
How can I serve the file after pressing the save button of the user here? Is there a way to handle the events of the buttons in the Save As dialog window?
I'll be happy if you can help me.