[sync] Document upload clean
This commit is contained in:
1 parent
a70967f37d
commit
a898dc446f
1 file changed
+1
-5
@@ -121,14 +121,10 @@ class Document(Model):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
async def upload(self):
|
async def upload(self):
|
||||||
print('uploading to s3', self.file)
|
|
||||||
|
|
||||||
filepath = self.provider.get_local(self.file)
|
filepath = self.provider.get_local(self.file)
|
||||||
name = os.path.basename(self.url)
|
name = os.path.basename(self.url)
|
||||||
|
|
||||||
o = 'uploads/{}'.format(name)
|
await request.s3_put(f'uploads/{name}', filepath)
|
||||||
await request.s3_put(o, filepath)
|
|
||||||
# await request.upload(url, filepath)
|
|
||||||
|
|
||||||
def bake(self):
|
def bake(self):
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in new issue
Block a user