saving data to zip

This commit is contained in:
sanjayk03-dev
2024-06-07 21:01:55 +05:30
parent e4b21459b8
commit d594602e18

View File

@@ -306,11 +306,11 @@ class ConfigRestoreHandler(bbctrl.APIHandler):
files_path = os.path.join(temp_dir, zip_file['filename']) files_path = os.path.join(temp_dir, zip_file['filename'])
# try: try:
# with open(files_path, 'wb') as f: with open(files_path, 'wb') as f:
# f.write(zip_file['body']) f.write(zip_file['body'])
# except Exception as e: except Exception as e:
# raise HTTPError(500, f"Error handling zip file: {str(e)}") raise HTTPError(500, f"Error handling zip file: {str(e)}")
# if not os.path.exists(self.get_upload()): # if not os.path.exists(self.get_upload()):
# os.mkdir(self.get_upload()) # os.mkdir(self.get_upload())