mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:56:30 +00:00
add list files for autoupdate feature
put new Versioning fix bugs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import io
|
||||
import os
|
||||
|
||||
cimport constants
|
||||
import boto3
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ cdef class CDNManager:
|
||||
cdef upload(self, str bucket, str filename, bytes file_bytes):
|
||||
try:
|
||||
self.upload_client.upload_fileobj(io.BytesIO(file_bytes), bucket, filename)
|
||||
print(f'uploaded {filename} ({len(file_bytes)} bytes) to the {bucket}')
|
||||
constants.log(f'uploaded {filename} ({len(file_bytes)} bytes) to the {bucket}')
|
||||
return True
|
||||
except Exception as e:
|
||||
print(e)
|
||||
@@ -37,7 +37,7 @@ cdef class CDNManager:
|
||||
try:
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
self.download_client.download_file(folder, filename, f'{folder}\\{filename}')
|
||||
print(f'downloaded {filename} from the {folder}')
|
||||
constants.log(f'downloaded {filename} from the {folder}')
|
||||
return True
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
Reference in New Issue
Block a user