Hello, i'm using imgurapi-3.0.0, ruby 2.1.0, rails 4.2.4
I've linked my imgur account to my rails project successfully, but now I have the following issue:
The only problem I have is that I can't upload an image to Imgur server.
Once I write this code (pretty similar to imgurapi documentation):
img_url = "#{Rails.root}/public/images/user.jpg" #this is a valid and existent image file
@my_image = @imgur_session.image.image.upload(img_url) #line where exception is thrown
This Exception is thrown:
wrong number of arguments (0 for 1) on @imgur_session.image.image
It seems like a parameter must be set on the second '.image' property, like this:
but even if i set it as an empty string like: @imgur_session.image.image('') it will throw another exception like Please provide a valid image identificator, because what I want is to upload a picture, not showing an existent file.
I think there might be a way to correct this allowing no parameters in order to upload an image,
Please feel free to correct me, or help me,
Hello, i'm using imgurapi-3.0.0, ruby 2.1.0, rails 4.2.4
I've linked my imgur account to my rails project successfully, but now I have the following issue:
The only problem I have is that I can't upload an image to Imgur server. Once I write this code (pretty similar to imgurapi documentation):
This Exception is thrown:
It seems like a parameter must be set on the second '.image' property, like this:
but even if i set it as an empty string like:
@imgur_session.image.image('')
it will throw another exception like Please provide a valid image identificator, because what I want is to upload a picture, not showing an existent file.I think there might be a way to correct this allowing no parameters in order to upload an image, Please feel free to correct me, or help me,
Regards, my friends.