Forum: Ruby on Rails Reading image file field data directly into RMagick

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sebastian F. (Guest)
on 2006-03-24 01:37
(Received via mailing list)
I'm trying to read image data from an upload file field directly into
an RMagick image object without having to temporally save the image
file first. Assuming my file field param is assigned to @temp_file, i
tried RMagicks from_blob method:

img = Magick::Image::from_blob(

But i get an error message saying that the blob is empty. I also
tried feeding it the entire IOString object returned by the file
field, but it can't deal with it either. Anybody knows how this can
be done? Thanks.

This topic is locked and can not be replied to.