File upload issue

Well, that is a pretty sticky problem. You'll have to decent to system
level I guess. On debian systems you can call 'free' with returns the
current memory usage. This command can of course be called in Ruby(and
thus Rails) and then parsed to see how much memory there is still
available.
But I am not sure that will do you any good. As I remember from
attachment_fu you can 'validate' the file size but only _after_ it
been uploaded. So that won't help you. Perhaps javascript could
intervene clientside?

Sample output free:
$ free
             total used free shared buffers
cached
Mem: 239820 216752 23068 0 35112
47252
-/+ buffers/cache: 134388 105432
Swap: 498004 249752 248252
$

I was not suggesting that you would validate the file size, I merely
pointed out a problem with attachment_fu in that respect.

As far as convincing Lighttpd to buffer the file to disk... I doubt
you can do that.

But seriously can't you sent a piece of Javascript which does the
checking? <pause> Just spoke to our JS guy and he does not believe it
can be done. In php.ini there is a variable called
max_post_size(usually), perhaps a Mongrel/Apache/Lighttpd takes a
similar parameter?