ownCloud
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode

Accessing Resources

If using File picker as a web component, it is returning selected resources via events called select and update. 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>

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

  item.addEventListener('select', event => {
    resources = event.detail[0]
  })
</script>