Using file API in Card Lists

Userlevel 5
Badge +20

We would like to make a little more advanced cardlist, that can shows multiple files from a child table.

Something like this:


I know how the html should like and have seen that indicium can deliver the images by file_id.


<img src="https://..../entity_document(ent_id=11111,doc_id=999999)/STT.download_doc_url(file_id='??????????????')?$size=100">

The only question I have, is how to determine the file_id of a saved files? 

Would it be possible anyways, or a another approach required?





Best answer by Vincent Doppenberg 31 May 2024, 15:01

View original

3 replies

Userlevel 6
Badge +4

Hello Harm,

The file_id parameter is an optional parameter that is only used for browser caching purposes. When the file_id is provided, Indicium will include a header in the response that instructs the browser to cache the response for that URL. When the file_id is not included (or file_id=null), the URL is not specific enough to allow the browser to cache it, but the request will work just fine.

You can only obtain the file_id by sending a request for the subject and including an $eager querystring parameter with a comma-separated list of file columns for which you want a file_id. So in your example, if you’d send this request:


You would see the download URL in the response with the file_id included.


Now I can imagine that this is not an option for you, so you could just do this instead:


I hope that helps.

Userlevel 5
Badge +20

Hi Vincent,

Sure this helps. I will try this straight away.

I assume it will work, you make us very happy with this! 


Userlevel 7
Badge +23

Well @Harm Horstman, did it work? 😄

If so, could you give us a sneak peak?