[Bese-devel] Re: file-upload-field
Marco Baringer
mb at bese.it
Thu Mar 16 13:38:01 UTC 2006
"Aycan iRiCAN" <aycan.irican at core.gen.tr> writes:
> Hi,
>
> I just created a simple file upload form (I used <ucw:form with
> :enctype "multipart/formdata" to get a proper upload-form) but I
> couldn't reach the stream of a file-upload-field. Any tips?
(i assume you meant multipart/form-data)
the value of a file-upload-field is, using mod_lisp or the httpd
backend, an rfc2388:mime-part object (araneida doesn't handle
multipart/form-data and i don't know what the status of
multipart/form-data on aserve is).
To get the filename, as provided by the client, use:
(rfc2388:get-header-attribute (rfc2388:get-header (value image-field)
"Content-Disposition")
"filename")
to get the stream use:
(rfc2388:content (value image-field))
suggestions on improving the api are more than welcome.
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
More information about the bese-devel
mailing list