[hunchentoot-devel] Controlling file uploads with hunchentoot

Hans Hübner hans.huebner at gmail.com
Wed Dec 2 10:05:45 UTC 2009


On Wed, Dec 2, 2009 at 10:47, Semion Prihodko <semion.ababo at gmail.com> wrote:
>> Do you want to decide whether to accept an upload by looking at the file name or the
>> multipart header?
> yes.

Assuming that "yes" means "I want to look at the file name":  You can
implement your own version of MAKE-TMP-FILE-NAME which checks the file
name and generates an error if it does not suit.  If you want to look
at other MIME headers in the body part to decide whether the upload
should proceed, you'll need to change the rfc2388 library.  I'd
implement a hook function that would be called from RFC2388:PARSE-MIME
for each body part with the headers as argument.

-Hans




More information about the Tbnl-devel mailing list