[sync] Document upload clean

This commit is contained in:
tmshv committed 2019-10-14 16:31:00 +03:00
1 parent a70967f37d
commit a898dc446f
1 file changed
+1 -5
+1 -5
View File
@@ -121,14 +121,10 @@ class Document(Model):
return None
async def upload(self):
print('uploading to s3', self.file)
filepath = self.provider.get_local(self.file)
name = os.path.basename(self.url)
o = 'uploads/{}'.format(name)
await request.s3_put(o, filepath)
# await request.upload(url, filepath)
await request.s3_put(f'uploads/{name}', filepath)
def bake(self):
return {