Method HttpMessagePart() :setFilePart() Foundation

Sets the value of a file part.

METHOD :setFilePart( <cName>, <cSourceName> [,<cTargetName>] ) --> oMessagePart
A character string with the logical name of the file. This name is used for accessing the file on the server.
A character string with the name and the path of the local file on disk.
A character string with the name of the target file on the server. This parameter is optional. It defaults to the filename part in the <cSourceName> parameter.

<cTargetName> is transmitted as-is. No transformation is applied to the string. If a special encoding is required, for example, a Base64 encoding for diacritical characters such as Umlauts, it must be applied manually before assigning the string to <cTargetName>.


:addFilePart() returns the message part object that is added to the message or message part. The headers of the new message part are automatically set up for uploading the file.


The method :setFilePart() defines the value of a certain file part. This causes an implicit upload of the file to the server.

The file is not loaded into memory until the request is posted. The file is transferred directly from the harddrive to the TCP channel.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.