ComponentsFile upload

File upload

Choose or drop an attachment, validate it, and show upload progress.

Example

Drop a file here or browse. PDF, text, JPG, or PNG. Up to 10 MB each.

    Setup

    Download the shared Inlay assets once. Then choose HTML, React, or Vue and copy the example above.

    Multiple files and retry

    Add multiple attachments. Each simulated first transfer fails once so you can try Retry.

    Example

    Drop files here or browse. PDF, text, JPG, or PNG. Up to 10 MB each.

      Usage

      ValidationThe examples accept PDF, text, and common image files. Validate file type and size on the server too.
      TransportThe examples simulate a transfer locally. For real uploads, remove data-ilui-upload-demo and set data-ilui-upload-url to a server endpoint that accepts a multipart form field named file.
      RetryRetry keeps the previously selected file. Removing a file stops its in-flight request and restores focus to the chooser.