How to upload pictures to a Rails-API?

Hi Guys,

I have a Rails backend done with the rails-api Gem and I’d like to upload pictures (I use paperclip but carrierwave is pretty much the same).

I first don’t understand why some people use Base64 while there is a file transfert plugin for cordova, so why choosing one or another solution ( How to make uploading files or images using ionicframwork or angularJS is not clear to me)

Secondly does someone has an exemple of picture upload to a rails-api ?

Thank you in advance,

Not too sure about rails, but if possible you could always use node.

http://coenraets.org/blog/2013/09/how-to-upload-pictures-from-a-phonegap-application-to-node-js-and-other-servers-2/

But if rails is your way, I found this but its a bit dated.

https://www.ruby-forum.com/topic/3719161