File Upload problem when file is small, under 19k(read metho


I hope someone can shed some light on this have searched a lot but found
nothing definite. This happens on Ubuntu and Fedora 2.

I am having a problem with uploading small files (images gif or jpeg
under 19k).

According to ruby documentation these are stored temporarily as StringIO
objects rather than temporary files (as is done with the larger file

The problem is that when it is a StringIO rather than a temporary file
nothing is returned from the read method.

example code where “image” is the file upload form parameter, it works
fine if image is over round 19k but is it is smaller then
returns nothing however the image.size and image.original_filename
return the correct information., “wb”) {|f| f.write( }

All the best

Ant Peacocke
T: + 33 (0) 8 70 46 63 37
M: + 33 (0) 6 09 81 06 00