Uploading to nested buckets in google cloud storage
<p>In google cloud storage, i have bucket called cats inside a root bucket called images. Im using the google-api-ruby-client gem to upload files. Im able to upload a file to the root bucket 'images' but uploading to 'images/cats' does not work. I am aware that the buckets in google cloud storage do not have a notion of slash, so I'm unable to figure out how to specify the name of the nested bucket.</p>

<pre><code>result = client.execute(
  api_method: api.objects.insert,
  media: media,
  parameters: {
    uploadType: 'resumable',
    bucket: 'images/cats',  #This does not work !. Just images works.
    name: 'kitty.jpeg',
  },
  body_object: {contentType: 'image/jpeg'}
)
</code></pre>

<p>This is giving the error <code>NoMethodError: undefined method query_values for nil:NilClass</code>. The code works if i just use 'images' for the value of the bucket.</p>

<p>How can i make the upload work for nested buckets as well ?</p>

<p>Thanks</p>