class GcsUpload(webapp2.RequestHandler):

    def post(self):
        field_storage = self.request.POST.get('file', None)
if isinstance(field_storage, cgi.FieldStorage):
    file_name = field_storage.filename
dyn = gcs_data.Dynamics(id=file_name, filename=file_name)
gcs_file_name = gcs_data.gcs_write_blob(dyn, field_storage.file.read())
gcs_data.gcs_serving_url(dyn)
dyn.put()
logging.info('Uploaded and saved in default GCS bucket : ' + gcs_file_name)
self.response.headers['Content-Type'] = gcs_data.gcs_content_type(dyn)
self.response.write(gcs_data.gcs_read_blob(dyn))
Upload files to Google cloud storage from appengine app