On Thu, Mar 6, 2008 at 1:15 PM, Dan Buettner <[EMAIL PROTECTED]> wrote:

> I'd like to change where mongrel stores files uploaded via web form from the
> local tmp dir to a place on the same filesystem where they will eventually
> reside, due to speed considerations (copying from tmp to NFS mount takes a
> little time while the user wait for the web form to return)
>
> Is there a way to do this do you think?

There's a way to do most anything.

Mongrel just uses Tempfile.  Tempfile just uses Dir::tmpdir, provided
by tmpdir.rb, to determine the temporary directory.

Dir::tmpdir defaults to /tmp, but it checks some environment variables first.

ENV['TMPDIR']
ENV['TMP']
ENV['TEMP']
ENV['USERPROFILE']

Just set one of those to the directory that you want it to use.



Kirk Haines
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to