CGI, stdin, image handling

Brian Yennie briany at qldlearning.com
Wed Jan 23 18:10:02 EST 2008


Richard,

Can you post the exact headers that you are getting? For example:

Content-Type: image/jpeg
Content-Transfer-Encoding: binary

You may have to focus on the encoding portion to make sure you are  
decoding the data properly. A couple other notes:

* Once you have the correct data in a variable, you should be able to  
just write it to a file using "binfile:". Be sure NOT to use the  
ordinary "file:" URL since you definitely have binary image data and  
not text.

* When you remove the MIME headers (the funky numbers and Content-  
headers), are you doing it manually with a text editor? If so, you  
might be introducing the funny characters yourself by accident.  
Better to make sure these are removed by script if possible.

Hope that helps a bit.

- Brian





More information about the use-livecode mailing list