Libraries
WebHub
ZaphodsMap
TPack
NativeXml
ldiRegEx
SendFile Method |
Declaration
Publicprocedure SendFile(const AFilespec: string);
Applies to
TwhListResponseDescription
Sends an entire file to the output document, expanding any WebHub expressions.
The SendFile method differs from SendFileIIS in that (a) the included file can be part of a larger document, and (b) WebHub expressions inside the file are expanded. (By contrast, SendFileIIS is optimized for sending a single complete file as the response, without expanding any expressions in that file.)
The INCLUDE command, which is available for use from WebHub-HTML, calls SendFile.
Parameter
- Value: the path and filename to send. Optionally, the filespec can be followed by a comma and then a byte-count. If a byte-count is included, only that portion of the file will be sent.
WARNING: do not include the optional byte-count if the file size is larger than 16k bytes and the file contains WebHub expressions, because some expressions may not expand.
Version-Specific Notes
For WebHub Components v1.000 to v2.098
Serious error for files larger than 16kbytes
If (a) the included file was larger than 16k bytes and (b) the included file contained WebHub expressions and (c) one or more of those expressions spanned a 16k boundary, then the expression would not expand, often resulting in garbage output visible to the surfer. This issue was fixed 18-Nov-2008 in WebHub v2.099. Many thanks to Sigi in NZ for the test file which demonstrated this long-standing problem. (Reference: support #00348)
Running DynHelp.exe v1.2.0.6 on WebHub-v2.125 built by D14
Calc time: 141 ms

