I have Carrierwave set up to upload images to S3 via Image model. Image model belongs to Posts. I am wondering how can I set it up as an API so you can add an image to a post? I know you have to use Base64 or something to convert the image but not sure what are the next steps..
Asked
Active
Viewed 504 times
0
-
Did you create an image uploader class per the carrier wave documentation? – BigRon Feb 09 '15 at 03:47
-
@BigRon yep! It all works I am just trying to figure out how would I do json type of api call to upload an image? – CodeCrack Feb 09 '15 at 03:55
-
I have not done it that way, but one potential solution is here: http://stackoverflow.com/questions/11006453/how-do-i-upload-a-file-via-carrierwave-over-a-json-api and here is a Base64 solution: http://stackoverflow.com/questions/9854916/base64-upload-from-android-java-to-ror-carrierwave – BigRon Feb 09 '15 at 03:59