I have an application where I give a response by downloading a certain file on the server to the client. I zipo the image files that are in a folder on the server and give a response by manipulating the headers so that the file is downloaded.
I noticed that when this generated file is slightly larger, there is a delay to download it, but the remaining time to download based on the file size is not displayed in the browser.
An example written in Aspx WebForm:
string fullpath = GenerateZippedPhotos(id); response.ContentType = "application/zip"; response.AddHeader("content-disposition", "filename=remessa_fotos.zip"); response.WriteFile(fullpath); response.Flush();
To correct the problem described above, what do I need to do?
Is there any way to "tell the browser" the size of the file being downloaded?