wwPageResponse::DownloadFile

Downloads a file directly from disk to the client and displays it on the client using FileOpen dialog rather than opening in the browser. This function specifically provides a file name to the browser and forces the browser to open the file rather than displaying it.

This method uses the same mechanism as TransmitFile(), which bypasses the Web Connection infrastructure when streaming the file to the client, which makes it very efficient and allows for very large files to be transferred including files larger than 16mb.

o.DownloadFile(lcFileName, lcContentType, lcFileDisplayName)

Parameters

lcFileName
The physical path to the filename to return to the client.

Note: If you're using the Web Connection .NET Module the filename specified must be inside of the Web directory tree in order to be downloadable. This means any files from other locations first need to be moved or generated into a Web relative path. With the ISAPI handler the file can live anywhere.

lcContentType
Content type (text/html, application/msword etc.)

lcFileDisplayName
The name of the file that is displayed in the download dialog


See also:

Class wwPageResponse

© West Wind Technologies, 1996-2021 • Updated: 01/26/21
Comment or report problem with topic