コード例 #1
0
ファイル: image_truck.py プロジェクト: pythonchelle/catsnap
 def upload_resize(self, resized_contents, suffix):
     filename = '%s_%s' % (self.calculate_filename(), suffix)
     key = Client().bucket().new_key(filename)
     key.set_metadata('Content-Type', self.content_type)
     key.set_contents_from_string(resized_contents)
     key.make_public()
コード例 #2
0
ファイル: image_truck.py プロジェクト: dariaphoebe/catsnap
 def _upload(self, filename, contents):
     key = Client().bucket().new_key(filename)
     key.set_metadata("Content-Type", self.content_type)
     key.set_contents_from_string(contents)
     key.make_public()
コード例 #3
0
ファイル: image_truck.py プロジェクト: pythonchelle/catsnap
 def upload(self):
     key = Client().bucket().new_key(self.calculate_filename())
     key.set_metadata('Content-Type', self.content_type)
     key.set_contents_from_string(self.contents)
     key.make_public()