Encrypted uploader

Encrypted Uploader

The Uploader component can optionally be put in encrypt mode (opens in a new tab) where:

  1. A user selects a single file
  2. The file is encrypted using Lit Protocol (opens in a new tab)
  3. The file is uploaded to Irys
  4. The user can choose to decrypt the file
  5. The file is then downloaded and decrypted using Lit Protocol

Detailed reading

For more information on how Irys works with Lit Protocol, see:


The component uses lazy funding, only funding when the currently funded balance is not sufficient to cover the cost of this upload. Once uploaded, file URLs are stored in the fileUrls state variable.

When uploading a single file, the URL generated is in the form[transaction-id]. When uploading multiple files, they are grouped together and uploaded as a group along with a manifest. The URL generated is in the form[manifest-id]/[file-name].

Access control rules

In its default configuration, the Encrypted Uploader component is configured to allow anyone to decrypt the data. This is done by defining an access control condition that says any wallet with an ETH balance >= 0 can decrypt the data.

For more information on access control conditions, see our docs and Lit's (opens in a new tab).