If you want to use ZIP and you think this would be fine for your users, it will certainly work. But you don't have to give a link to the file stored to on the server side. If you want, you can do it on the fly, using the class
System.Net.HttpWebResponse
with corresponding
ContentType
. Please see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.web.httpresponse.aspx[
^] (see the code sample here),
http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.contenttype.aspx[
^].
In case of ZIP, your content type should be "application/zip". For other types, please see:
http://en.wikipedia.org/wiki/Internet_media_type[
^],
http://www.iana.org/assignments/media-types[
^].
However, your content does not have to be ZIP. You can still use your particular image type, but enforce saving the image instead of rendering it on the page. For this purpose, you should add your own HTTP request header which can look like this:
Content-Disposition: attachment; filename="some-file-name"
There is no a special property for this particular header in the
HttpWebRespose
class, so you need to compose this header and add it using the property
System.Net.HttpWebResponse.Headers
:
http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers.aspx[
^].
—SA