RestClient を使用して、この CURL リクエストを Ruby に変換するのに問題があります。
system("curl --digest -u #{@user}:#{@pass} '#{@endpoint}/#{id}' --form image_file=@'#{path}' -X PUT")
400 Bad Request
エラーが発生し続けます。私が知る限り、リクエストは適切に認証されますが、ファイルのアップロード部分でハングアップします。これが私の最善の試みであり、そのすべてで400エラーが発生します。
resource = RestClient::Resource.new "#{@endpoint}/#{id}", @user, @pass
#attempt 1
resource.put :image_file => File.new(path, 'rb'), :content_type => 'image/jpg'
#attempt 2
resource.put File.read(path), :content_type => 'image/jpg'
#attempt 3
resource.put File.open(path) {|f| f.read}, :content_type => 'image/jpg'