add list files for autoupdate feature

put new Versioning
fix bugs
This commit is contained in:
Alex Bezdieniezhnykh
2025-06-10 23:38:37 +03:00
parent dcd0fabc1f
commit f9815a0a3f
26 changed files with 204 additions and 127 deletions
+3 -3
View File
@@ -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)