I am using window.location.replace(URL) to download file from mounted path on server. I wanted to delete the file from server after downloading on local system using different API. But I am not sure if file download is completed or not. Is there a way to check if window.location.replace(URL) action is completed?
Asked
Active
Viewed 445 times
0
-
You can have a look at here https://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download . Maybe if that helps you at some extent. – Ankit Agarwal Mar 12 '18 at 06:59
-
It did not help me, since i am not using get/post request download file – Sangeeta Chorage Mar 12 '18 at 07:18
-
What are you using then? – Ankit Agarwal Mar 12 '18 at 07:18
-
window.location.replace(URL), where url is a absolute path of file mounted on server. Using this, i can download file on local system – Sangeeta Chorage Mar 12 '18 at 07:23