views:

19

answers:

1

Hi i am new to ruby on rails can you help me in writing a web service which uploads an image and stores in database.

Thanks in advance

+1  A: 

No one's gonna just give you the code, but, in a way, someone has.

Paperclip is a Ruby gem that handles file uploads and attaches them to a model. That's the hardest part of what you're describing. The README doc on that page describes the installation process pretty well, and I imagine the rest you can handle yourself, with the Rails documentation at your side :)

Matchu
hey i have uploaded an image using paperclip in rails app but i dont know how to write a web service
dhaval
@dhaval - in what way is a "web service" significantly different from a standard Rails application? Use the REST pattern, as you likely already are, set up a standard communication format for responses instead of HTML (XML, JSON, etc.), and you're good to go with a simple web service.
Matchu
hey thanks just was confused bcoz of the actionwebservice gem
dhaval