diff --git a/file_peer/peer_service.py b/file_peer/peer_service.py index c96faa6..f596d2e 100644 --- a/file_peer/peer_service.py +++ b/file_peer/peer_service.py @@ -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) diff --git a/file_peer/uploads/2_bcdef.txt b/file_peer/uploads/2_bcdef.txt new file mode 100644 index 0000000..447472f --- /dev/null +++ b/file_peer/uploads/2_bcdef.txt @@ -0,0 +1,2 @@ +Hello World! +Flask Notes Transfer Test 2 \ No newline at end of file