Attempting to upload a file through the gem to the storage api results in a Google::Apis::ClientError: parseError: This API does not support parsing form-encoded input. error.
storage.insert_object(bucket_name, nil, { name:'test_test.tar.gz.gpg', upload_source: File.open(file_path,'rb')})
is the command that I am trying to run. This line appears to be setting the content-type to form-encoded
Which is trigger right above it because the body is empty, which is empty because here
Thanks for any help.
Whoops guess I should have added this in the initial comment. @sqrrrl
FWIW, should be able to work around it by specifying the name in the body instead of query param.
storage.insert_object(bucket_name, { name: 'test_test.tar.gz.gpg' }, upload_source: File.open(file_path,'rb'))
Thank you that will work!! I owe you a 馃嵑
Looks like this issue is resolved.
I'll add for any future search results to use https://github.com/GoogleCloudPlatform/google-cloud-ruby for the Cloud Storage API
Most helpful comment
FWIW, should be able to work around it by specifying the name in the body instead of query param.