guides:o4w:o4w_api:o4wdownload

O4WDownload routine

Generates a file download.

O4WDownload(filename, contentType, content, suggestedFilename, newWindowName, keepFile)

The function has the following parameters:

ParameterDescription
filenameCan be an operating system file, or an OpenInsight file (in the form <table>" "<itemID>).
contentTypeIf <contentType> is not specified, it is determined from <suggestedFilename>/<filename>, if possible.
contentThe contents of the file to download.
suggestedFilenameThe name to display as the "Save as…" on the download. If not specified then the filename parameter's value is used. If suggestedFileName parameter is null, then the downloaded item will attempt to be opened in the current browser page, and not as an attachment.
newWindowNameIf specified, and this is generated during an O4W "response", then a new browser window will be opened for the response.
keepFile If <keepFile> is set to "1", the file (if any) is not removed after this call (by default, O4WDownload will remove the file after downloading). O4W toolkit applications should return after the O4WDownload call, as no other content can be returned.
  • guides/o4w/o4w_api/o4wdownload.txt
  • Last modified: 2024/06/19 20:19
  • by 127.0.0.1