In my asp.net core 2.0 application, upon user's request, I need to present the user a zip file of the photos currently stored in a sqlserver database. The photos are about 1M in size on an average.
I saw a few examples that use MemoryStream
over ZipArchive
to create a stream-based zip file. However, this requires that all the photos (1000+) be zipped first before getting transferred. I may not even have that much memory to hold the entire collection. I am wondering if there is a mechanism such that I can continue to fetch and archive photos while streaming is going on. Also, are there any sqlserver timeout or website timeout constraints I need to worry about? Regards.