I am still prototyping, so my names will likely change but this is the response I get from my API (as copied from my swagger docs)
[
{
"id": 0,
"upload": "http:/url/to/file",
"file_name": "string.pdf",
"svar_id": "/string.pdf"
}
]
although I don't put the api response directly into the file manager, I map over my list of files and parse out the svar_id field and add set the type to be "file" because I am not handling folders yet (still very much prototyping)
const fileData: IEntity[] = files.map((file) => ({
id: file.svar_id,
type: "file",
}));
and then I pass it into the filemanager component along with my data
<Willow>
<Filemanager init={init} data={fileData} menuOptions={menuOptions} />
</Willow>