Error getting tags :
error 404Error getting tags :
error 404 libUrlMultipartFormAddPart | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle
libUrlMultipartFormAddPart (form data,part name,value[,MIME type,encoding])
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
This function lets you add parts to a multipart form one at a time. It also lets you optionally specify the mime type and transfer encoding for each part. This can be useful where the mime type or transfer encoding has to be specified.

put empty into tForm
put "dave" into tName
put "hello" into tMessage
if libUrlMultipartFormData (tForm, "name", tName, "message", tMessage)\
ty then
empty then
##handle error and exit
end if
set the httpHeaders to line 1 of tForm
delete line 1 of tForm
put "<file>" & "C:/myfile.gif" into tFile
put "image/gif" into tType
put "binary" into tEnc
if libUrlMultipartFormAddPart(tForm,"file", tFile, tType, tEnc)\
empty then
##handle error and exit
post tForm to url
set the httpHeaders to empty
end if

Additional Comments
Expander triangle

This function is mainly used if you have called the libUrlMultipartFormData with no arguments except the form data. This will return an "empty" form which can be added to using this function.

Important! The libUrlMultipartFormAddPartfunction is part of the Internet library. To ensure that the keyword works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the Standalone Application Settings window, make sure "Internet Library" is selected in the list of script libraries.

Note: When included in a standalone application, the Internet library is implemented as a hidden group and made available when the group receives its first openBackground message. During the first part of the application's startup process, before this message is sent, the httpkeyword is not yet available. This may affect attempts to use this keyword in startup, preOpenStack, openStack, or preOpenCardhandlers in the main stack. Once the application has finished starting up, the library is available and the httpkeyword can be used in any handler.

User Comments
Expander triangle