Re: Sending a large file - WeOnlyDo Discussion board

Re: Sending a large file (General questions)

by wodDamir, Wednesday, September 27, 2006, 09:47 (6424 days ago) @ Simon

Hi Simon,

The Filename Property is used to specify the file in which response body should be stored. In your sample, if you open your page in your browser, you should see the content of the file you specified in the Filename Property.

However, if you specify a very big file, then loading such a page would take a long time.

If you want user to be able to download that page instead of viewing it's content in browser you could do something like this in RequestDone Event (VB6):
--------------------------------------------
User.Response.Headers.Add Content-Disposition , attachment; filename=your_file_filename
User.Response.FileName = path_to_your_file
--------------------------------------------

If you do this, then user who loads your page should be prompted with a save file dialog.

Hope i helped.

Regards,
Damba


Complete thread: