wwPageResponse::DownloadFile

Downloads a file directly from disk to the client using a FileOpen dialog.

This method is similar in behavior to TransmitFile but it adds additional headers to coerce the client to treat the file as a separate file so it isn't open in the browser as document but as a Save As dialog.

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-2019 • Updated: 09/07/11
Comment or report problem with topic