Posting formdata to URL
dcragg at lacscentre.co.uk
Mon Sep 12 09:54:23 EDT 2005
On 12 Sep 2005, at 13:27, Ton Kuypers wrote:
> I have a problem posting a file to a website using RR
> I need to supply some parameters and the file, just like a normal
> webform would post, but I keep on getting errors...
> Uploading the file doesn't work, if I try to retrieve information
> including parameters, there is no problem (put URL XXX into url (/
> Users/Ton/desktop/etc, etc, etc).
> Using post vPostData to vURL then I get an error.
> Anybody any suggestions how to upload a file to an .aspx page?
You'd have to confirm what encoding the server script expects, but
posting files is normally done using a content type of multipart/form-
data. (If you have an html version of the form, check if the form tag
has an ENCTYPE attribute of "multipart/form-data".)
Then take a look at the libUrlMultipartFormData function. (I just
noticed that the standard Rev dictionary leaves out an important
piece of data in this entry. I think the docs incorrectly interpret
some of the text as an xml tag.) I suggest you look at the web
version of the libUrl documentation:
More information about the Use-livecode