[hunchentoot-devel] Calculating size of the uploaded file

Hans Hübner hans.huebner at gmail.com
Wed Jul 11 04:40:46 UTC 2012


Andrei,

there are no specific hooks in the code that report the file size of
uploaded files, but the situation has changed compared to 2008 in that
we do no longer intend to replace the rfc2388 library in the
foreseeable future.  There are some pending changes regarding how
uploaded files are handled which have not been merged because we're
waiting for rfc2388 to be updated in Quicklisp.  Maybe these changes
help you, too: https://github.com/fighting-spirit/hunchentoot/commit/301db3d6f6291dd8690b095ee708fff2d53f5664

If you have any suggestions in form of a patch based on these changes
that would help you get your problem solved, please let us know.

-Hans

On Wed, Jul 11, 2012 at 12:04 AM, Andrei Stebakov <lispercat at gmail.com> wrote:
> Hi
>
> It's been discussed before (even prior Hunchentoot 1.0.0) that there
> has to be some way to allow the developer to calculate size of the
> file being uploaded and act upon that (maybe cancel the upload if the
> file is too big).
> Before I did it using a hack into parse-multipart-form-data function
> where I provided a callback to my own function which calculated the
> size of (header-in :content-length request) and if it was too big,
> aborted the request.
> I wonder if there is a better way to do it with the new architecture?
> Also if I put my own hacks into the ht code it would be difficult for
> me to update.
>
> Thank you,
> Andrei
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel




More information about the Tbnl-devel mailing list