@@ -26,7 +26,7 @@ async def upload_chunk(
26
26
chunk_number : Annotated [int , Form ()],
27
27
total_chunks : Annotated [int , Form ()],
28
28
chunk_hash : Annotated [str , Form ()],
29
- ):
29
+ ) -> None :
30
30
"""
31
31
Allow individual chunks to be uploaded and later reassembled.
32
32
@@ -56,7 +56,6 @@ async def upload_chunk(
56
56
57
57
if chunk_number == total_chunks - 1 :
58
58
reassemble_file (total_chunks , file .filename )
59
- return
60
59
except Exception as e :
61
60
logger .error (f"Error during chunk upload: { e } " )
62
61
raise HTTPException (status_code = 500 , detail = str (e )) from e
@@ -66,7 +65,7 @@ async def upload_chunk(
66
65
async def upload_single (
67
66
file : Annotated [UploadFile , File ()],
68
67
file_hash : Annotated [str , Form ()],
69
- ):
68
+ ) -> None :
70
69
"""
71
70
Upload a single file.
72
71
@@ -87,7 +86,6 @@ async def upload_single(
87
86
logger .info (f"Hash matches: { calculate_md5_checksum (file_content , file_hash )} " )
88
87
89
88
save_file (file )
90
- return
91
89
except Exception as e :
92
90
logger .error (f"Error during file upload: { e } " )
93
91
raise HTTPException (status_code = 500 , detail = str (e )) from e
0 commit comments