Ruby on Rails : upload file to server -


i'm using android device upload file server using post method. don't know how make rails handle event. means, after android device sends file server method post link : http://localhost/upload_file, rails server can handle event, , put file database, example.

i have google , results tell me use additional plugin. exist pure method use rails ? please tell me.

thanks :)

rails can handle file uploads pretty easily. here relevant guide should read: http://guides.rubyonrails.org/form_helpers.html

here's small snippet guide:

5.1 gets uploaded

the object in params hash instance of subclass of io. depending on size of uploaded file may in fact stringio or instance of file backed temporary file. in both cases object have original_filename attribute containing name file had on user’s computer , content_type attribute containing mime type of uploaded file.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -