From: Ari Johnson
Subject: Uncommon Web File Uploads
Date: 
Message-ID: <m2wtbrusf5.fsf@hermes.theari.com>
Does anyone have much experience with accepting file uploads with UCW?
I am not sure whether I want to store certain uploaded images in a
database field or in a directory on disk, but either way I need to get
them there.

It appears that UCW (at least on SBCL) gives you a binary-mode
FD-STREAM pointing to the uploaded file, which it puts on disk as
/tmp/ucw##############.  What are the best options as far as dealing
with such a beast?  I don't want these files piling up in /tmp, and I
want to be able to make a more delayed use of them than just having an
FD-STREAM without more work (such as piping it from there to somewhere
else) on my part.

Thanks.
From: Marco Baringer
Subject: Re: Uncommon Web File Uploads
Date: 
Message-ID: <m2y7w6hdaj.fsf@bese.it>
Ari Johnson <················@gmail.com> writes:

> Does anyone have much experience with accepting file uploads with UCW?
> I am not sure whether I want to store certain uploaded images in a
> database field or in a directory on disk, but either way I need to get
> them there.
>
> It appears that UCW (at least on SBCL) gives you a binary-mode
> FD-STREAM pointing to the uploaded file, which it puts on disk as
> /tmp/ucw##############.  What are the best options as far as dealing
> with such a beast?  I don't want these files piling up in /tmp, and I
> want to be able to make a more delayed use of them than just having an
> FD-STREAM without more work (such as piping it from there to somewhere
> else) on my part.

in src/backend/common.lisp you'll find the code which processes file
uploads, it shouldn't be too hard to change it to pipe the data
directly to some process (or just keeping it in memory if the files
are small). though what's wrong with using the stream and just
deleting the file when you're done? are the files so big that you
can't manage two copies of them simultaneously?

ps - this discussion should probbaly continue on
··········@common-lisp.net

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen