I''ve a "attachment" model that has: title: string image: paperclip attribute video: paperclip attribute I want to let the users to upload an attachment by using xml or something like that, all the actions supports xml If they call the controller/action (http://example.net/attachments) with a post, right now they could do something like curl -H "Content-Type: application/xml" -X POST -d "<attachment><title>Nice Picture</title></attachment>" http://example.net/attachments But I would like to get a way to test that if I upload the file by using curl or anything else, they will be able to upload the file, if they give it the param "image" it will be processed as an image, if they give it the param "video" it will be processed as a video But I don''t have idea how they may call the action with the xml and upload the file, or if I should use another way or what Thx -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Any help on this one? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
BTW, the code I had for the rails code is pretty simple http://pastie.org/1135382 I''m just looking the way to upload a file by using a third party application (I''m trying to provide an api to customers) Thank you -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''ll see if I can help. Can you explain what you want to see happen that''s not? What do the logs tell us? If you''re able to make this work in some situations, compare the log output to a failed request and see if the differences give us any clues. Luke On Sep 2, 10:55 pm, Rodrigo Dominguez <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> BTW, the code I had for the rails code is pretty simple > > http://pastie.org/1135382 > > I''m just looking the way to upload a file by using a third party > application (I''m trying to provide an api to customers) > > Thank you > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.