Spaces:
Running
Running
Update function/dropbox.py
Browse files- function/dropbox.py +2 -2
function/dropbox.py
CHANGED
@@ -90,7 +90,7 @@ def download_folder(id):
|
|
90 |
try:
|
91 |
TOKEN = refresh_token_dropbox()
|
92 |
dbx = dropbox.Dropbox(TOKEN)
|
93 |
-
local_path = f"
|
94 |
os.makedirs(local_path, exist_ok=True)
|
95 |
clear_local_folder(local_path)
|
96 |
result = dbx.files_list_folder(f"/{id}")
|
@@ -129,7 +129,7 @@ def search_and_download_file(start_char, id):
|
|
129 |
print(f"No file found starting with '{start_char}' in folder '{id}'")
|
130 |
return
|
131 |
file_name = files_starting_with_char[0]
|
132 |
-
local_folder_path = f"
|
133 |
os.makedirs(local_folder_path, exist_ok=True)
|
134 |
local_file_path = os.path.join(local_folder_path, file_name)
|
135 |
with open(local_file_path, "wb") as f:
|
|
|
90 |
try:
|
91 |
TOKEN = refresh_token_dropbox()
|
92 |
dbx = dropbox.Dropbox(TOKEN)
|
93 |
+
local_path = f"/code/user_file/{id}"
|
94 |
os.makedirs(local_path, exist_ok=True)
|
95 |
clear_local_folder(local_path)
|
96 |
result = dbx.files_list_folder(f"/{id}")
|
|
|
129 |
print(f"No file found starting with '{start_char}' in folder '{id}'")
|
130 |
return
|
131 |
file_name = files_starting_with_char[0]
|
132 |
+
local_folder_path = f"/code/user_file/{id}"
|
133 |
os.makedirs(local_folder_path, exist_ok=True)
|
134 |
local_file_path = os.path.join(local_folder_path, file_name)
|
135 |
with open(local_file_path, "wb") as f:
|