I am creating an API for processing files in Rails, and I need to have access to it through a separate stone. The API uses Carrierwave, and this part works without problems. What I do not understand how to do is to take an arbitrary file and deliver it to the API from the gem interface.
Carrierwave accepts its files as the results of File.open('foo.jpg') or as POST from the file field. I'm really not sure what I am doing to serialize the file and send it.
How to take the contents of a file and turn it into something that I can transfer and send via JSON?
Mark tabler
source share