Over a million developers have joined DZone.

Create A New Instance Of Magick::Image Out Of Uploaded Form Data

·
Taken from Norman Timmler's example on the Ruby on Rails mailing list:


def file=(new_file)
 new_file.rewind
 image = Magick::Image::from_blob(new_file.read).first
end
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}