Skip to content

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.

File list & API

The batch buttons, overall and per-file progress, templates for the browse button and the items, and driving the component from code.

Batch actions

ShowBatchActions adds Upload all, Cancel all and Clear buttons under the list. They keep their places as uploads settle - an idle one is only marked unavailable - so keyboard focus is never lost. UploadAllText, CancelAllText and ClearText relabel them.



Progress & file list

OverallUploadProgress, TotalUploadSpeed and OverallRemainingTime summarize the batch, and each file has its own UploadSpeed and RemainingTime (null while not on the wire). Re-read them from OnProgress.


0 %


Batch: idle (-)


FileSizeFormatter replaces the built-in size text, and HideFileView leaves the list undrawn while the files are still uploaded and reported through Files.



No file selected yet.

Templates

LabelTemplate replaces the browse button - and its drop indicator, so bring your own through Classes.Dragging - and FileViewTemplate replaces each item, with the BitFileInfo as its context. Use real buttons with an aria-label naming the file, and the per-file Upload(file) / RemoveFile(file) overloads.


Public API

Browse, Upload, PauseUpload, CancelUpload, RemoveFile and Reset drive the component from code, each on one file or - with no argument - on all of them. Pause keeps the bytes sent so Upload resumes; cancel settles the file, which can be retried later. Files and UploadStatus report the state.


Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.