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

[REBOL] enctype="multipart/form-data"

From: ryan:christiansen:intellisol at: 25-Apr-2001 15:46

Librarian comment

Andreas Bolka's decode-multipart-form-data  seems to be most often used as a base for handling multi-part forms.

I want to be able to submit image files using POST and to save those image files from the POSTed input. I am taking steps in this direction, and so I gave my form tags a new enctype attribute. I'm using the following function to make an object! out of POSTed data: retrieve-user-data: func [] [ return make object! decode-cgi either system/options/cgi/request-method = "POST" [ input ][ system/options/cgi/query-string ] ] When I give the <FORM> tag enctype attribute the "multipart/form-data" value, I get an error saying REBOL can't find the path to one of the submitted values. ** Script Error: Invalid path value: actionType ** Where: message-action-cgi ** Near: switch/default cgi-input/actionType The form DOES submit input named actionType but apparently my REBOL code is not decoding the input correctly. I am probably misunderstanding the multipart/form-data concept. Does anyone here have an example of REBOL code they use to decode POSTed multipart/form-data, especially data which includes an image file posted using the <INPUT TYPE=FILE> tag? Thanks. Ryan C. Christiansen Web Developer Intellisol International 4733 Amber Valley Parkway Fargo, ND 58104 701-235-3390 ext. 6671 FAX: 701-235-9940 Global Leader in People Performance Software _____________________________________ Confidentiality Notice This message may contain privileged and confidential information. If you think, for any reason, that this message may have been addressed to you in error, you must not disseminate, copy or take any action in reliance on it, and we would ask you to notify us immediately by return email to [ryan--christiansen--intellisol--com]