Method HttpRequestMessage() :addFileParameter() Foundation

Adds a file parameter.

Syntax
 
:addFileParameter( <cName>, <cSourceFile> [,<cTargetFile>] ) --> self
Parameters
<cName>
A character string with the logical name of the file. This name is used for accessing the file on the server.
<cSourceFile>
A character string with the name and the path of the local file on disk.
<cTargetFile>
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 <cSourceFile> parameter.

<cTargetFile> 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 <cTargetFile>.

Return

:addFileParameter() returns the object executing the method.

Description

The method :addFileParameter() adds a file parameter to the parameter list. The file is uploaded to the server when the message is sent. Existing values are preserved, which means that if a parameter named <cName> already exists, the value specified in <cValue> is appended to this parameter's value list.

Feedback

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.