[REBOL] Re: jpeg images not working
From: gchiu:compkarori at: 29-Aug-2002 13:12
On Wed, 28 Aug 2002 15:47:25 -0800
Tim Johnson <[tim--johnsons-web--com]> wrote:
>* Jason Cunliffe <[jason--cunliffe--verizon--net]> [020828
>15:35]:
>> Hi Tim
>>
>> Are you hoping to use multipart/x-mixed-replace to
>>upload image files to a web
>> site?
>
> Yes!
I'm confused. Your code seems to indicate you want to
send images to a client browser. There's an example from
Allen that shows how to send dynamically created images
back to the client in the library somewhere on rebol.org
If you want to upload using http to a web server, this
snippet from my test suite might help
boundary: {--Rj74=$}
imagedata: to-string read/binary filename
des1: rejoin [ {Content-Disposition: form-data;
name="FILE_UPLOAD_FNAME"; filename="} filename {"} ]
des2: {Content-Disposition: form-data;
name="FILE_UPLOAD_CLAIM_NUM"}
des3: {Content-Disposition: form-data;
name="FILE_UPLOAD_MD5_SUM"}
des4: {Content-Disposition: form-data;
name="IMAGE_FILE_ANNOTATION"}
postdata: rejoin [ boundary CRLF des2 CRLF CRLF claimno
CRLF boundary des3 CRLF CRLF md5 CRLF boundary des4 CRLF
CRLF annotation CRLF boundary des1 CRLF CRLF imagedata
CRLF boundary "--" CRLF CRLF ]
--
Graham Chiu