@uc = Uploadcare::Api.new({ ...settings... })
file = params[:file][:tempfile] # this returns a tempfile object
@uc.upload(file)
This blows up with the following error:
Expected `object` to be an Uploadcare::Api::File, an Array or a valid URL string, received: `#<File:0x00007faef4915320>`
uploadcare-ruby-2.1.2/lib/uploadcare/api/uploading_api.rb:13:in `upload'
I tried the following:
This blows up with the following error:
The error is actually here: https://github.com/uploadcare/uploadcare-ruby/blob/e02b825787c95c7fa975dffd33dcba8e8b085178/lib/uploadcare/api/uploading_api.rb#L8
A tempfile is a file but not of class
File
so your case equality check fails. Tempfiles should be allowed.