Skip to content

Commit b381e07

Browse files
new changes commit 1
1 parent 87b4cff commit b381e07

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/frontend/src/components/uploadButton.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,22 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
362362

363363
return (
364364
<div style={{ width: '100%', minWidth: '720px', maxWidth: '800px', margin: '0 auto', marginTop: '0', padding: '16px', paddingBottom: '60px' }}>
365+
{/* Show file rejection errors for invalid type or size at the very top */}
366+
{fileRejectionErrors.length > 0 && (
367+
<MessageBar
368+
messageBarType={MessageBarType.error}
369+
isMultiline={true}
370+
onDismiss={() => setFileRejectionErrors([])}
371+
dismissButtonAriaLabel="Close"
372+
styles={{ root: { display: "flex", alignItems: "left", background: "#fff4f4", marginBottom: "16px" } }}
373+
>
374+
<div style={{ display: "flex", flexDirection: "column", alignItems: "left" }}>
375+
{fileRejectionErrors.map((err, idx) => (
376+
<span key={idx} style={{ marginBottom: "4px" }}>{err}</span>
377+
))}
378+
</div>
379+
</MessageBar>
380+
)}
365381
<ConfirmationDialog
366382
open={showCancelDialog}
367383
setOpen={setShowCancelDialog}

0 commit comments

Comments
 (0)