Mongrel and uploaded files (temp location)

Asked this about a month ago but no response - would appreciate any
thoughts
anyone might have.

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?

Thanks for any info,
Dan

On Thu, Mar 6, 2008 at 1:15 PM, Dan B. [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 H.