On Jun 9, 10:14 am, Bohdan Pohoriletz <[email protected]> wrote: > I tried next > > post '/users/create' do > RestClient.post("http://localhost:3000/users", :user=>params['user'], > :avatar=>File.read("/home/qwerty1/Desktop/client/views/images.jpeg"), > :multipart=>true) > redirect '/users' > end > > --------------------------------------- > > require 'paperclip' > class User < ActiveRecord::Base > has_attached_file :avatar, :styles=>{:thumb=>"100x100", > :medium=>"200x200"} > # validates_attachment_presence :avatar > end > > but id didn't sent any image to server > > Am I doing something wrong ?
Did you try setting a breakpoint in your rails app to see that the image was being received properly. Does paperclip expect the name of the uploaded file (which you aren't currently transmitting) to have an acceptable extension or for the content type to be set ? Fred > -- > Posted viahttp://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 [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-talk?hl=en.

