Good day everybody!
Is it possible to check from the app structure if a specific file exists?
I have the following scenario:
A table where every row has download links to one mp3 and one zip. I want the buttons only to show, when this files actually exists on the server. I simplified the files already by naming them with the id of each database entry (Like 2319.mp3 and 2319.zip). The advantage of this is, I don’t need to store the file path in the database since I can get the ID from the table body, the directory is always the same. So the link is /dir/{{ID}}.mp3. That works perfectly.
I already tried a serverconnect which is linked to a server action with a file exists. But dynamic attributes (in this case “show”) can’t load server connects with input parameters.
If there is a way to check files on table load, would it increase load time?
Last updated: