Skip to main content

Attributes usage

Component have a lot of attributes, but not all of them are required. This page will help you to understand which attributes are required and which are optional.

Attributes​

You can use the following attribut to toggle the component behavior:

  • token - required - Your IPFS provider APIKEY or JWT (see Configuration).
  • provider - optional - IPFS provider. Possible values: pinata, web3.storage (default: web3.storage).
  • isdisplayresult - optional - Display the result of the upload in the DOM. Default value is false.
  • isdisplaytoast - optional - Display notification toast. Default value is false.
  • isfromurl - optional - Upload file from URL. Default value is false.

Code example​

<web3-upload-btn 
token="YOUR_WEB3STORAGE_APIKEY"
isdisplayresult="true"
isdisplaytoast="true">
Upload to IPFS
</web3-upload-btn>

Preview result​

Upload to IPFS