From: Dmitry Borodaenko Date: 2003-11-03T20:12:06+09:00 Subject: Re: CGI uses file size to distinguish between regular values and files On Mon, Nov 03, 2003 at 02:29:08PM +0900, Simon Kitching wrote: > I suspect that the fact that tempfiles are used by this module is a > private implementation detail, ie something that users are not > supposed to be aware of, or depend upon. Why, you can always check if the parameter you've got _is_ a Tempfile, and, if it is not, assume that it is small enough to be handled in core. Adopted from Samizdat source: if Tempfile === file then File.syscopy(file.path, upload) else # StringIO File.open(upload, 'w') {|f| f.write(file.read) } end Did I miss something? -- Dmitry Borodaenko