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.
Uploading
The 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.
Events
OnFilesChange, OnInvalid, OnUploading (set per-file headers here), OnProgress,
OnUploadComplete / OnUploadFailed, OnRemoveComplete / OnRemoveFailed and
OnAllUploadsComplete. Each file carries the server's ResponseStatus (0 when unreachable) and
Message. Try a file over 1 MB.
No File
Chunked
ChunkedUpload sends each file as a series of requests, so a pause or a failure resumes from the last
chunk. ChunkSize fixes the slice; AutoChunkSize adapts it to the connection (512 KB - 10 MB).
Each chunk carries BIT_FILE_ID, Content-Range and BIT_CHUNK_FROM /
BIT_CHUNK_TO / BIT_FILE_SIZE for the server to reassemble it.
Adaptive chunk sizing:
Http requests
Headers, query strings and extra form fields for the upload and remove requests are fixed at selection
time.
Their async ...Provider counterparts run before every request - each file and each chunk -
which is what keeps an expiring token or a presigned URL (UploadUrlProvider) fresh.
Requests so far: 0
The transport itself: UploadRequestHttpMethod, UploadFormFieldName,
RemoveRequestHttpMethod, WithCredentials and a per-request UploadTimeout.
Retry
AutoRetries retries a failed upload, waiting AutoRetryDelay (or an
AutoRetryDelayProvider backoff) in between. By default only failures a retry can fix are retried -
network errors, timeouts, 408, 429, 5xx; ShouldAutoRetry replaces that rule. After the budget is
spent the item offers a retry button (RetryIcon, RetryButtonTitle).
A 404 is not retried - the file fails at once:
A ShouldAutoRetry that insists, backing off 1s, 2s, 4s:
ConcurrentUploads
ConcurrentUploads caps how many files are on the wire at once; the rest wait in order, show the
QueuedUploadMessage and can be canceled before their turn. 0 (the default) starts them all.
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.