Tag Link | [File_Serve] | Category | Output |
---|---|---|---|
Type | Process | Source Available | Yes |
Support | Preferred | Version | 6.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LDML | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0 |
The [File_Serve] tag serves a file which is stored in a variable in place of the current Lasso format file. The name of the file can be specified and, in supported browsers, the file will be written to disk using that name and/or displayed in the browser.
The [File_Serve] tag can be used to serve image files, multimedia files, file archives, or even HTML files.
None of the contents of the current format file will be served. [File_Serve] completely rewrites the HTTP headers and contents of the served response. [File_Serve] also performs an [Abort] so no tags after [File_Serve] will be executed.
The first parameter to the tag should be a variable which contains the file to be served. An optional
Possible MIME types include:
- text/html - HTML text
- image/jpeg - JPEG graphic file
- image/gif - GIF graphic file
- image/png - PNG graphic file
- text/xml - XML data
- application/pdf - Portable Document Format file
[File_Serve: 'File Data']
[File_Serve: 'File Data',
[File_Serve: 'Image Data',
[Var: 'myFile' = (Include_Raw: 'Example.jpg')]
[File_Serve: $myFile,
Required Parameters | |
---|---|
'File Data' | The first parameter to the tag should be the file data that will be served. |
Optional Parameters | |
-File | The |
-Type | The |
-Disposition | The disposition can be set to 'Inline' to force most browsers to display the served file in the browser rather than saving it to disk. |
-Charset | Specifies the character set for the served data. |
See the Lasso 8 Language Guide for examples of how to use this tag.
Substitution | ||
---|---|---|
|
|
|
Container | ||
|
|
|
Process | ||
|
|