Specifying filesystem destination for uploaded files

I saw a question on this in the archive, but no responses. Also haven’t been able to find much of anything via Google, so here goes.

I’ve got a workflow app built on Rails that involves checking out document files and checking them back in after local processing. This is done with a file form element, pretty standard. Some of these files can be quite large, so I am looking for ways to improve performance.

I’ve implemented one change already that has helped, namely utilizing File.move on the uploaded temp file, rather than reading it into memory and writing to a new file as is usually done in example code. On my development laptop this was a huge improvement.

However, on my production server, the rails app’s document storage is on a network mount, while the web server’s temp directory is of course local. So File.move has to copy the data between filesystems. It’s actually still faster than having Ruby read and write the files, but not as dramatic.

I’m using an Apache frontend proxied to pack-of-mongrels setup.

How can I direct mongrel to write uploaded files to a network mount?

While it may be slower then local disk, it would save time overall if the system could keep the uploaded file on the same filesystem when moving it into place.

Thanks for any info, Dan