Accessing Resources

File picker is returning selected resources via event called selectResources. To access them, you need to set an event listener where you’ll be able to get them as part of the response of the callback function.

Access resources

<file-picker id="file-picker" variation="resource"></file-picker>

  const item = document.getElementById('file-picker')
  let resources = []

  item.addEventListener('selectResources', event => {
    resources = event.detail[0]