fix: applicant portal — document uploads, round filtering, auth hardening

Fix round-specific document uploads (submittedAt no longer blocks uploads),
add view/download buttons for existing files, enforce active-round-only for
uploads/deletes. Harden auth layout and set-password page. Filter applicant
portal rounds by award track membership.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 13:29:39 +01:00
parent 1103d42439
commit a39e27f6ff
8 changed files with 192 additions and 37 deletions

View File

@@ -126,6 +126,14 @@ export function getContentType(fileName: string): string {
* Validate image file type
*/
export function isValidImageType(contentType: string): boolean {
const validTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp']
const validTypes = [
'image/jpeg',
'image/jpg', // non-standard but common browser alias for image/jpeg
'image/png',
'image/gif',
'image/webp',
'image/svg+xml',
'application/octet-stream', // some browsers send this as a fallback
]
return validTypes.includes(contentType)
}