Is there a way to detect a canceled download?

Say I have a Spring MVC web application and it allows users to upload a file. An email is sent at the same time the file is sent to the user.

Is there a way to detect a canceled download so that I can send an email only if the download is successful?

+3
source share
1 answer

You need a script download that serves larger files in separate blocks. When the last block is served, you can accept (there is no way to know with HTTP) that the entire file was received by the client.

157318 194579 , PHP, HTTP ( HTTPS) , .

+2

Source: https://habr.com/ru/post/1710978/


All Articles