Does anybody have any insight into this problem? Any help would be
appreciated.
Thanks
cheers
dafydd
Thats the way rails works. If an uploaded file is less then 10Kb
then it will be put in a StringIO, if it is over 10k it will get put
in a tmpfile. You will have to branch with conditionals on this to
support what you want. If its a StringIO then you need to read it
into mem and write it out to wherever you want it. If its a tmpfile
then you can just call path on it and move it somewhere.
if StringIO === params[:zip_file]
data = params[:zip_file].read
File.open(‘some/path’, ‘wb’){|f| f.write data }
else