I''ve figured out some of what I want to do here, so I can be more
specific:
This create action adds each uploaded Image, then creates a thumnail of
each and stores it in the @temp_thumb_data array.
def create
@artwork = @current_user.artworks.new params[:artwork]
params[:image_data].each do |file|
@artwork.images << Image.new( :uploaded_data => file ) if file.size
> 0
end unless not params[:image_data]
@temp_thumb_data = []
@artwork.images.each do |image|
image.with_image do |img|
@temp_thumb_data << img.thumbnail(100, 100).to_blob
end
end
...
However it is stored as an encoded string and can thus not simply be
displayed. The normal method would be to use send_data in another
action, but I can''t do that here because the uploaded file is not being
persisted and would not be available to the other action.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---