You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
The remote thumbnails path and filename are derived from media_id when they're generated and stored with dynamic_thumbnails set to true. The said thumbnails are looked up by filesystem_id which fails every time. Synapse uses a lot of CPU regenerating the thumbnails all the time. When dynamic_thumbnails option is then turned off Synapse can't find the thumbnails generated when the said option was turned on and just returns 404.
Steps to reproduce
set dynamic_thumbnails to true
try to load a thumbnail of a remote media
now set dynamic_thumbnails to false
try to load the same thumbnail of the remote media
it returns 404
Local media thumbnails are generated and retrieved just fine. For example, I'm trying to retrieve a media with id zOUYnsGQKLQypwBoQkRpnkXh and corresponding filesystem id WFzEWtlvXlCaZShcaIthgzrG. The media itself is stored at /var/lib/matrix-synapse/media/bc/remote_content/matrix.org/WF/zE/WtlvXlCaZShcaIthgzrG and I can retrieve it from my server. The thumbnail should be located at /var/lib/matrix-synapse/media/bc/remote_thumbnail/matrix.org/WF/zE/WtlvXlCaZShcaIthgzrG/30-30-image-png but it's actually stored at /var/lib/matrix-synapse/media/bc/remote_thumbnail/matrix.org/zO/UY/nsGQKLQypwBoQkRpnkXh/30-30-image-png. Why do we even need two identifiers? It confuses things pretty much (it's hard to find an offending file in the storage if you know its id without looking it up in the database) and doesn't add any security.