Commit 309c2619 authored by tarun2512's avatar tarun2512

fourth commit

parent 39222a0c
......@@ -232,14 +232,15 @@ def push_data(zip_path, folder_name, user_id, project_id, prefix=None):
def extract_app_zip(app_name, user_id, project_id, prefix=None):
zip_path = os.path.join(BASE_PATH, MOUNT_DIR, f"{app_name}.zip")
CloneScriptHelper().unzip_file(zip_path, zip_path)
folders_list = CloneScriptHelper().list_folders(zip_path)
folders_list.pop("app_image")
folders_list.pop("app_logo")
folder_path = os.path.join(BASE_PATH, MOUNT_DIR, app_name)
CloneScriptHelper().unzip_file(zip_path, folder_path)
folders_list = CloneScriptHelper().list_folders(folder_path)
folders_list.remove("app_image")
folders_list.remove("app_logo")
for folder in folders_list:
if folder in ["app_image", "app_logo"]:
continue
push_data(zip_path, folder, user_id, project_id, prefix)
push_data(folder_path, folder, user_id, project_id, prefix)
if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment