0

I'm on Ruby on Rails, using both cloudinary gem and your their recommended jquery uploader by //= require cloudinary.

I'm using the following helper to upload

f.cl_image_upload(:the_image)

I think the uploading goes fine, cause I see the image in Cloudinary's control panel and a string gets saved for the the_image attribute, e.g.

"image/upload/v1412372928/wz2yv3w04xnaferfyqrv.jpg#c1ecda5de9194c1357ef800128b154ff9c7e5593"

But I receive an error image when I want to display the image with this helper :

cl_image_tag(@user.the_image, :alt => "Sample Image")

Cloudinary's image_helper is generating the following URL:

http://res.cloudinary.com/gnossy/image/upload/v1/image/upload/v1412372928/wz2yv3w04xnaferfyqrv.jpg%23c1ecda5de9194c1357ef800128b154ff9c7e5593

I have been following these guides:
http://cloudinary.com/documentation/rails_image_upload
http://cloudinary.com/documentation/rails_integration

Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232

1 Answers1

0

Carrierwave can get the value of the image and parse the relevant parameters. For more information about Carrierwave and Cloudinary: http://cloudinary.com/documentation/rails_carrierwave

You can manually use the PreloadedFile class to manually get the identifier of the image. You can have a look at the sample project which demonstrates both server site and client-side uploads with Carrierwave integration.

Itay Taragano
  • 1,901
  • 1
  • 11
  • 12