I would like to add .gpx files attached as media to Omeka S items. I add the relevant extension and file type (“text/xml”) in the settings, and I can upload it alright.
The publicly visible page of the item then includes reference to the media and its title, as well as a download link to the file itself. This is all as expected, except for one thing: the text to be clicked on to download the file is the file name used internally by Omeka, i.e. something like this: 4e214a8a6a6f7466095f99357e248588b2553650.gpx
I tried to add a custom thumbnail in the advanced tab of the media, but to no avail: only the filename and not the thumbnail is shown.
Any suggestions on how to get a better outcome, without going the whole route of custom ingesters/renderers?
A generic text that remains the same for all files without an own renderer, e.g. a clickable “download file”, would be alright, as I can give context using title and desription. Perhaps the original source file name could be ok.
For my use case, a thumbnail to be uploaded manually for each such items would also work.
I suppose this is defined in a fallback renderer in core Omeka S, but I’m not finding where exactly this is. Any hint would be warmly welcomed.
More broadly, given how Omeka S renames files, I suspect that using the internal file name for the link is unlikely to be the desired solution, and perhaps a generic expression or the media title would be a better default.
I should add that when embeds are disabled, the file appears as expected on the item page, with the custom thumbnail and link to the media page. But this just shifts the issue somewhere else: when you open the media page, then you still have a link with the “ugly” file name.
If there are not more structural solutions, it should be probably possible to fix it in the theme… before the theme calls for echo $media->render();
, I could perhaps add a check for media type with something like $media ->mediaType()
, and then build something similar to linkPretty()
with direct link to the file directly inside the theme.