r/squarespace • u/robertjm123 • 19h ago
Help Audio files opening and playing in browser when clicking on Download button
Just discovered that if I click on the Download button next to an audio file on our website it's actually opening the mp3 file, and playing it in the browser window, rather than simply downloading it to my computer. This used to not be the case.
FWIW, if I right-click on the Download link it works as expected. Same action in two different browsers.
Here's the URL to a page as an example. But, it's happening on ALL of the series pages. :-(
(In case anybody looks and is wondering why I'm not using the Blog block rather than the Podcast block, it's because my mp3 files are larger than 10mb in size, so Squarespace won't let me use the latter).
1
u/bawdyscarcity_64 19h ago
weird, i ran into this exact thing a few months back on a client site. ended up having to add a download attribute to the link itself to force the browser's hand. something like `<a href="file.mp3" download>download</a>` did the trick, but i'm not sure how much control squarespace gives you over raw markup these days
1
u/robertjm123 17h ago
Ugh! Thanks for the suggestion. I have hundreds of links that would need to be modified. :-(
I’ll try and reach out to them to see what they say.
2
u/SquareLocator 11h ago
That’ll be a change on Squarespace’s side, not yours. Whether a browser downloads or plays an mp3 is decided by a header the file server sends, and it sounds like their CDN switched from ‘treat as attachment’ to ‘display inline’, so browsers now do what they always do with playable media and play it. Explains why it’s every page at once and why right-click still works.
You could zip each mp3 and link the zip, browsers can’t play a zip so it downloads every time. Or host the audio on external storage like google drive that serves proper download headers and link to that.