[Bese-devel] Streams Binary Flexi?

Henrik Hjelte henrik at evahjelte.com
Wed Feb 15 09:46:07 UTC 2006


On ons, 2006-02-15 at 10:44 +0200, Aycan iRiCAN wrote:
> henrik hjelte <henrik at evahjelte.com> writes:
> 
> > On tis, 2006-02-14 at 12:30 -0500, Nathan Bird wrote:
> >> I'm currently looking at some bug in ucw where it is having a hard time
> >> dealing with form posts using mod_lisp
> >
> > With my latest bugfix it works for me with a fresh get from darcs. At
> > least the form demo, the form upload demo doesn't work like before
> > because mime-part-body now returns a binary-stream to a temporary file. 
> > Which is really quite nice.
> 
> It's nice but it's hard to use in some cases. Think of an upload form
> that get's a picture from user. If you need to make a preview for this
> form, you have to copy that temporary file into your webroot and
> rename it's extension (to be able to show in a web page). Your
> temporary files are growing with a factor of 2 now.

Why not just move the temporary file and rename it in one operation? On
most filesystems this is a very fast thing. This seems to me to be a
perfect example when a temporary file is good, since it is converted to
a permanent file.

If the alternative is to have a stream into memory, prepare your server
for the case when user decides to upload a zip file containing his
collection of Hollywood movies in HDTV quality :-)

Maybe a choice would be best, but are the temp files really a problem? 
/Henrik Hjelte




More information about the bese-devel mailing list