Posting binary data -- followup
Alejandro Tejada
capellan2000 at gmail.com
Tue Dec 14 17:21:51 EST 2010
Hi Devin,
Just out of curiosity:
What is the content of the variable "tForm"?
Thanks in advance
Al
Devin Asay wrote:
>
> I followed the example at that URL and it worked like a charm. I used this
> script, which also displays the multipart form data so you can see what's
> going on behind the scenes:
>
> on mouseUp
> put empty into tForm # create the variable
>
> put "Devin" into tName
> put "2010-12-13" into tDate
>
> answer file "Choose file: "
> if it is empty then exit mouseUp
> put "<file>" & it into tFile
> if libUrlMultiPartFormData(tForm, "name", tName, "date", tDate,
> "file", tFile) is not empty then
> answer "error:" & it
> else
> set the httpHeaders to line 1 of tForm
> put tForm into fld 1 -- shows the multipart form data in a field
> post line 2 to -1 of tForm to url
> "http://some.server.com/test_post/a_script.cgi"
> -- answer the result -- for debugging: displays error, if any
> set the htmltext of fld 3 to it
> -- put it into fld 3: uncomment to show raw html
> end if
> end mouseUp
>
> Hope this is helpful to someone.
>
> Regards,
> Devin
>
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Posting-binary-data-tp3047407p3088111.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list