Inputs
FileUpload
Bit.BlazorUI
BitFileUpload sends the files a user picks, drops or pastes to a server endpoint over HTTP - whole or in resumable chunks - with per-file progress, pause, cancel, retry and server-side removal, validation on arrival, and a fully themable, templatable and screen-reader friendly UI. For file selection without uploading, use BitFileInput.
Overview
Uploading to a server endpoint, the label icon and description, the drop area and extra drop zones, and removing uploaded files.
Basic
Browse, drop a file on the component, or paste one while it has the focus. Each file gets an item with
an upload button that sends it to the UploadUrl, then a progress bar with pause and cancel, and
finally a status message.
Label & description
LabelIconName (or LabelIcon for an external library) adds an icon to the browse button,
placed by LabelIconPlacement. Description - or DescriptionTemplate for markup - puts
a hint under the button and wires it through aria-describedby, the place to state the limits up front.
PDF or DOCX, up to 5 MB.
Images only. Up to 2 MB.
Drop area & drop zones
ShowDropArea turns the browse button into a large dashed panel - still a single button, so it is
reached with Tab and opened with Enter or Space.
Any file type, up to 10 MB each.
AllowDrop and AllowPaste switch the two extra routes off at runtime. A refused drop is still
swallowed, so the browser never navigates away to the file.
DropZoneSelector makes any matching element a drop target too. While a drag is in flight every zone
carries Classes.Dragging / Styles.Dragging, which is what highlights the card below.
Drop files anywhere in this card
Removable
ShowRemoveButton adds a remove button to each settled item. A file that never reached the server is
just dropped; an uploaded one is deleted through a DELETE to the RemoveUrl (name in the query
string, id in the BIT_FILE_ID header). The focus moves to the next item instead of being lost.
Topics
Everything else about FileUpload, one page per topic.
- Selection & validationMultiple, appended and auto-uploaded selections, the size, count and custom rules, folders and the camera, and image previews with their dimensions.
- UploadingThe events of every step, chunked and resumable uploads, the headers, query strings and form fields of the requests, automatic retries, and a cap on parallel uploads.
- File list & APIThe batch buttons, overall and per-file progress, templates for the browse button and the items, and driving the component from code.
- Forms & accessibilityFiles already on the server, accessibility, and validating the selection inside an EditForm.
- CustomizationThe button variants, defaults for every uploader of a subtree through BitParams, colors, external icons, sizes, Style & Class, and right-to-left layouts.
- API referenceEvery parameter, public member, sub-class, enum and CSS variable of BitFileUpload.
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.