Updated file service

This commit is contained in:
2024-04-21 16:16:05 -04:00
parent 94c534963d
commit 38a1bdf604
2 changed files with 3 additions and 2 deletions

View File

@@ -45,13 +45,12 @@ def request_file():
if response.status_code == 200:
if os.path.exists(file_path):
return "File with name already exists", 200
with open(file_path, 'wb') as f:
f.write(response.content)
print("File downloaded successfully")
return f'File Downloaded to location to location {file_path}',
return f'File Downloaded to location to location {file_path}', 200
else:
error = response.text
print("Error:", error)

View File

@@ -0,0 +1,2 @@
Hello World!
Flask Notes Transfer Test 2