Album image of federated S3 instance broken
Hi
Here's what I think I understood.
Steps to reproduce
- Subscribe to the library of a server using S3 as a storage backend.
- For each album, the attachment cover is stored in the local DB with an attachment object.
- The attachment object contains a temporary S3 URL to the image.
- Wait for the URL to expire.
- Show the album cover without opening it directly, eg:
- in the /albums listing,
- one of its songs in a playlist,
- one of its songs in the queue
- The cover doesn't show up.
- To see it again, you need to trigger album refetching by opening the album (
/library/albums/xxx
). You'll see this line in the logs:funkwhale_api.music.views INFO Refetching music.Album:xxx at https://xxx.xx/federation/music/albums/xxx…
In Django's admin, I can see the attachment object for the attachment cover is a new id after album refetching.
How I guess one can solve this issue
I see two options:
- the federated server proxies the image and provides a fixed url.
- the local server stores the cover in its cache.
Funkwhale version(s) affected: 1.2.7