There are more issues though. I've documented them here:
http://izumi.plan99.net/blog/index.php/2007/04/07/ruby-on-railss-handling-of-uploaded-files/
To summarize:
1. Some libraries, such as RMagick, also have bugs. RMagick.read (or
something) checks whether its parameter is an IO object, and if not,
it will treat the parameter as a filename. StringIO.is_a?(IO) returns
false, so if I pass a StringIO to RMagick it will think that it's a
filename.
2. If the uploaded file is a Tempfile, then you have to unlink it
manually, or it will stay on the filesystem. StringIO doesn't have an
unlink method so you have to manually check whether you can call
unlink or whether the object is a Tempfile.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---