Skip to main content

How To Provide Users With Useful Cloudinary Exception Response in Rails?

Comments

1 comment

  • Itay Taragano

    Hi Alexander,

    If you wish to keep the uploads being performed on the server-side, then you can use something like the following:

    begin
    upload = Cloudinary::Uploader.upload(self.picture_link.to_s)
    rescue CloudinaryException => e

    #Perform handling code, for example:

    msg_to_display = e.message
    end

    Alternatively, you might want to consider performing the uploads client-side, i.e., uploading images  directly from the browser to Cloudinary. This way, you can use our jQuery library to validate the uploads on the client-side, before uploading the file to Cloudinary.

    0

Post is closed for comments.