Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: multipart/form-data

From: andreas:bolka:gmx at: 30-Aug-2002 19:22

------ comment [ ; for Jason only When you store some REBOL code into a vanilla snip, look out for {}'s in the original code, as these are valid string delimiters in REBOL but special characters in vanilla. Use my original code as posted on the mailing list as you've one of these "escpaing mistakes" in the file you attached to your last mail. ] ------ In your example, tmp-post will look like the following: [ MAX_SIZE: "100000" description: "describe me" filename: make object! [ filename: "E:\FLASH\jasonMX\buddha.jpg" type: "image/pjpeg" content: {JFIFHH File ....} ] ] you'd probably use it as follows: cgi-obj: construct tmp-post or if you use some older rebol cgi-obj: make object! tmp-post and then access the filename of the uploaded file via cgi-obj/filename/filename or you could write the content to a file write/binary %somefile.jpg cgi-obj/filename/content all of these should work :) good luck! :) Friday, August 30, 2002, 2:04:01 PM, Jason wrote:
> -----------------------------7d22e4fe68 > Content-Disposition: form-data; name"MAX_SIZE" > 100000 > -----------------------------7d22e4fe68 > Content-Disposition: form-data; name="description" > describe me > -----------------------------7d22e4fe68 > Content-Disposition: form-data; name="filename"; > filename="E:\FLASH\jasonMX\buddha.jpg" > Content-Type: image/pjpeg > JFIFHH File written by Adobe Photoshop 5.2 .........etc etc > etc............ > Q2: How to I access the tmp-post object? For example the filename or > description? > Q3: How to save just the image contents as a jpeg file, and link it > for display.
-- Best regards, Andreas mailto:[andreas--bolka--gmx--net]