post an image

Jan Schenkel janschenkel at yahoo.com
Thu Jan 27 16:14:37 CST 2005


--- paolo <carambola at aliceposta.it> wrote:
> Do you know how can I post an image to a revCGI 
> stack and have this 
> image to be saved on the cgi-bin folder?
> 
> Ciao Paolo Mazza
> 

Hi Paolo,

One option is to send the image data in base64
encoding ; and then base64 decode it again on the
other side.

Or you could send the raw data, but change the
httpHeaders before you POST the data, so the webserver
and the cgi-script know it's image data :
--
  put image 1 into tImageData
  set the httpHeaders to "Content-type: image/png"
  post tImageData to URL tCGIScriptURL
--
Then from your cgi-script, you can check the
CONTENT_TYPE environment variable.

Hope this helped,

Jan Schenkel.

=====
Quartam - Tools for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 


More information about the use-livecode mailing list