Read Any Asset

Retrieving asset sources can be tricky. Here we identify all of the available parts and then assemble them into a url.

http://ward.dojo.fed.wiki/assets/pages/simple-csv-reader/read-any-asset.html HEIGHT 400

host — source for html script origin — owner of the browser tab site, slug — for page with Assets plugin item — id of Assets item on the page dir — folder specified in Assets plugin path — url route to assets directory file — file name found in asset folder url — public address for file

Note: we number each unique cell value. Hover to see the string each number represents.

for (let source of assets){ let site = source.panel.site let slug = source.panel.slug let item = source.panel.itemId for (let dir of keys(source.assetsData)) for (let path of keys(source.assetsData[dir])) for (let file of source.assetsData[dir][path]) let url = `${path}/${dir}/${file}`