title: Using "media" uploadType in Ruby Google Cloud Storage API
body: <p>I'm in the process of writing up some sample code, and I'm having some trouble getting the "media" uploadType option to work correctly. </p>
  
  <p>I'm learning both Ruby and the APIs at the same time, so bear with me - but this (and several slight variations) is what I was trying:</p>
  
  <pre><code>media = Google::APIClient::UploadIO.new('file.txt', 'text/plain')
  media_insert_result = client.execute(
    api_method: storage.objects.insert,
    parameters: {
      uploadType: 'media', 
      bucket: BUCKET_NAME, 
      name: OBJECT_NAME
    },
    media: media
  )
  </code></pre>
  
  <p>Everything works happily for resumable, multipart, and metadata uploads, but I can't seem to get media to work. Any pointer in the right direction would be appreciated.</p>