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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to