@@ -53,11 +53,12 @@ async def home(session: Session = Depends(get_session)):
5353 stats = metrics .snapshot ()
5454 totals = fetch_storage_totals (session )
5555 uploads_count = max (int (stats .get ("uploads" , 0 )), totals ["total_files" ])
56+ max_file_text = f"{ MAX_FILE_SIZE_MB :.1f} MB"
5657
5758 html = render_template (
5859 "pages/home.html" ,
5960 {
60- "max_file_mb " : f" { MAX_FILE_SIZE_MB :.1f } " ,
61+ "max_file_text " : max_file_text ,
6162 "uploads" : str (uploads_count ),
6263 "downloads" : str (stats .get ("downloads" , 0 )),
6364 "deleted" : str (stats .get ("deleted" , 0 )),
@@ -70,9 +71,10 @@ async def home(session: Session = Depends(get_session)):
7071
7172@router .get ("/api-info" , response_class = HTMLResponse )
7273async def api_info ():
74+ max_file_text = f"{ MAX_FILE_SIZE_MB :.1f} MB"
7375 html = render_template (
7476 "pages/api.html" ,
75- {"max_file_mb " : f" { MAX_FILE_SIZE_MB :.1f } " , "rate_limit" : str (RATE_LIMIT_PER_MINUTE )},
77+ {"max_file_text " : max_file_text , "rate_limit" : str (RATE_LIMIT_PER_MINUTE )},
7678 )
7779 return HTMLResponse (content = html )
7880
@@ -185,7 +187,7 @@ async def _auth_admin(request: Request, allow_blank: bool):
185187 duration = state ["penalty" ] * ADMIN_LOCK_STEP_SECONDS
186188 state ["lock_until" ] = now + timedelta (seconds = duration )
187189 minutes = max (1 , duration // 60 )
188- msg = f"Too many failures. Locked for { minutes } minutes."
190+ msg = f"Too many attempts. Too many failures. Locked for { minutes } minutes."
189191 if allow_blank :
190192 return False , msg , True
191193 raise HTTPException (status_code = 429 , detail = msg )
0 commit comments