Trying to download an mp3 file using GetRemote I get the following error:
ERROR Unable to get remote resource http://127.0.0.1:8000/storage/articles/popper-een-afrekening/53d5e6ae-c841-4d06-a0b9-401bfe3cdc74.mp3: error calling resources.GetRemote: failed to resolve media type for remote resource "http://127.0.0.1:8000/storage/articles/popper-een-afrekening/53d5e6ae-c841-4d06-a0b9-401bfe3cdc74.mp3"
And after adding the following lines to my hugo.toml:
Error: error building site: process: readAndProcessContent: "/Users/camille/Developer/Home/reactionair.nl/content/articles/_content.gotmpl:68:8": template: /Users/camille/Developer/Home/reactionair.nl/content/articles/_content.gotmpl:68:8: executing "/Users/camille/Developer/Home/reactionair.nl/content/articles/_content.gotmpl" at <$.AddResource>: error calling AddResource: media type "audio/mpeg" not found
Are you sure that the server at http://127.0.0.1:8000 is returning audio/mpeg as the content type? You can examine the response header in your browser’s dev tools.
Your config works fine for me with v0.127.0.
git clone --single-branch -b hugo-forum-topic-50208 https://github.com/jmooring/hugo-testing hugo-forum-topic-50208
cd hugo-forum-topic-50208
hugo server
I had forgotten about this. Do you happen to remember the conditions under which the allow list additions are required? I can’t remember. It might have been:
The gist of THIS issue is that the mediaType set in AddResource must be a configured media type. resources.GetRemote has some extended logic that I’m not able to spell out from memory on a Saturday night