code: def _upload(auth_http, project_id, bucket_name, file_path, object_name, acl):
      
      with open(file_path, 'rb') as f:
          data = f.read()
      content_type, content_encoding = mimetypes.guess_type(file_path)
  
      headers = {
          'x-goog-project-id': project_id,
          'x-goog-api-version': API_VERSION,
          'x-goog-acl': acl,
          'Content-Length': '%d' % len(data)
      }
      if content_type: headers['Content-Type'] = content_type
      if content_type: headers['Content-Encoding'] = content_encoding
  
      try:
          response, content = auth_http.request(
              'http://%s.storage.googleapis.com/%s' % (bucket_name, object_name),
              method='PUT',
              headers=headers,
              body=data)
      except httplib2.ServerNotFoundError, se:
          raise Error(404, 'Server not found.')
  
      if response.status >= 300:
          raise Error(response.status, response.reason)
  
      return content
docs: Uploads a file to Google Cloud Storage.
  
      Args:
          auth_http: An authorized httplib2.Http instance.
          project_id: The project to upload to.
          bucket_name: The bucket to upload to.
          file_path: Path to the file to upload.
          object_name: The name within the bucket to upload to.
          acl: The ACL to assign to the uploaded file.