Skip to content

File Upload

A drop zone that is also a button, picker triggers, validation and a list of the chosen files - on top of Blazor's InputFile.

Styled with CSS Tailwind

Drop zone with validation

Click the zone (or press Enter / Space on it) to open the picker - straight from the browser, so the click's user activation is never lost to a round trip - or drop files on it (data-dragging). Accept, MaxFileSize and MaxFiles apply to dropped files too; refused ones go to OnFilesRejected with their reasons. Every selection keeps its own hidden input, so the files of earlier selections stay readable with OpenReadStream.

Drop files here, or click to browse Images, PDF or text · up to 2 MB · 0/4
    An unhandled error has occurred. Reload 🗙