I have a collection which contains an image file (well, I appreciate it's just a foreign key for directus_files).
I use axios to read the collection and I get the file id back for each row. It would appear that I then need to iterate over that data to get the file information for each file id. And thus infer the URL. This seems very inefficient.
I assume I'm missing something??
Ah... ?fields=.
Just wanted to add to this:
I've managed to look up those details by getting
/_/items/[collectionname]?filter[whateverfilter]&fields=document.data
then get full_url
N.B. in order for this info to be accessible from Public, you have to adjust your Public Permissions: Files > 'type' must be marked as readable in System Collections
Most helpful comment
Just wanted to add to this:
I've managed to look up those details by getting
/_/items/[collectionname]?filter[whateverfilter]&fields=document.datathen get full_url
N.B. in order for this info to be accessible from Public, you have to adjust your Public Permissions: Files > 'type' must be marked as readable in System Collections