We have a client having issues with secure media uploads.
This client is running a docker based Discourse (official install) with AWS S3 and secure media enabled.
The forum has a number of mp3 and m4a sound files.
Discourse automatically embeds a nice player like this:
Problem: the sound files do not work reliably. Sometimes they do not play.
I cannot reproduce this 100% reliable, I think because of caching, but it seems that the download is postponed until the play button is pressed. That sounds logical and good.
But it doesn’t play nice with secure media uploads - if you leave a page open for a while and press the play button after a minute or so, the sound file does not (always) play. At that point, AWS returns a
403 Expired error. It looks like the request is not signed at the moment the file is requested, but earlier. The error message clearly states that the request expired in the past.
I suspect this has to do with the delay, but I am not 100% sure. Fact is that this is happening to sound files only (i.e. not to embedded images which are always downloaded immediately).
Yes, server time is correct.
I can repro on a fresh install running latest beta. Just put two sound files in a topic and mess around a bit.