Skip to content

libcURL.MultipartForm.AddElement

Andrew Lambert edited this page Mar 16, 2017 · 30 revisions

Method Signatures

 Function AddElement(Name As String, Value As String) As Boolean
 Function AddElement(Name As String, Value As FolderItem, ContentType As String = "") As Boolean
 Function AddElement(Name As String, ValueCallbackHandler As libcURL.EasyHandle, ValueSize As Integer) As Boolean

Parameters

###AddElement(String, String)

Name Type Comment
Name String The name of the form element (i.e. the name attribute of the HTML <input> tag)
Value String The content of the element

###AddElement(String, FolderItem, String)

Name Type Comment
Name String The name of the form element (i.e. the name attribute of the HTML <input> tag)
Value FolderItem A file to encode in the form
ContentType String Optional. The Content-Type of the file (e.g. text/html.)

###AddElement(String, libcURL.EasyHandle, Integer)

Name Type Comment
Name String The name of the form element (i.e. the name attribute of the HTML <input> tag)
ValueCallbackHandler EasyHandle The EasyHandle whose DataAvailable event should be raised whenever the form element contents are needed.
ValueSize Integer The total number of bytes to read via the DataAvailable event.

Return value

Returns True if the operation succeeded. Check MultipartForm.LastError for the error number if this method returns False.

Remarks

Pass a string to set a string element or a folderitem to set a file upload element. You may also pass an instance of EasyHandle to have libcURL raise its DataAvailable event whenever the form element contents are needed.

See also

Clone this wiki locally