@@ -60,12 +60,13 @@ async def upload_file(
6060 # Validate base64 content size (configurable limit to prevent abuse)
6161 try :
6262 content_size = len (request .content_base64 ) * 3 // 4 # approximate decoded size
63- max_size = 50 * 1024 * 1024 # 50MB default (configurable)
64- if content_size > max_size :
65- raise HTTPException (status_code = 413 , detail = f"File too large. Maximum size is { max_size // (1024 * 1024 )} MB" )
6663 except Exception :
6764 raise HTTPException (status_code = 400 , detail = "Invalid base64 content" )
6865
66+ max_size = 250 * 1024 * 1024 # 250MB default (configurable)
67+ if content_size > max_size :
68+ raise HTTPException (status_code = 413 , detail = f"File too large. Maximum size is { max_size // (1024 * 1024 )} MB" )
69+
6970 try :
7071 s3_client = app_factory .get_file_storage ()
7172 result = await s3_client .upload_file (
@@ -127,11 +128,8 @@ async def list_files(
127128 processed_files = []
128129 for file_data in result :
129130 processed_file = file_data .copy ()
130- if isinstance (processed_file .get ('last_modified' ), str ):
131- # If already a string, keep it
132- pass
133- else :
134- # Convert datetime to ISO format string
131+ if not isinstance (processed_file .get ('last_modified' ), str ):
132+ # Convert datetime to ISO format string if it's not already a string
135133 try :
136134 processed_file ['last_modified' ] = processed_file ['last_modified' ].isoformat ()
137135 except AttributeError :
0 commit comments