logviewer icon indicating copy to clipboard operation
logviewer copied to clipboard

Images in messages affected by Discord's new Signed Attachment CDN URLs

Open inklesspen opened this issue 11 months ago • 4 comments

https://discord.com/developers/docs/reference#signed-attachment-cdn-urls

Discord automatically updates the URLs in the client with new signatures so the images keep working, but of course the URLs in the mongo database do not get updated. When the expiration time on the URL is reached, the image will no longer work.

inklesspen avatar Mar 24 '24 22:03 inklesspen

We already forsaw this coming. It's unfortunate but nothing really we can do as the logviewer is standalone and doesn't connect to discord to refresh the URLs.

A user removing the images from their DMs would also remove them from logviewer as well so it's nothing new anymore.

sebkuip avatar Mar 24 '24 23:03 sebkuip

It would be nice if there were some way to store them in mongo. Perhaps opt-in, with a ?saveimages command.

inklesspen avatar Mar 24 '24 23:03 inklesspen

I personally think turning media files into base64 to save those in the mongodb would be the perfect solution for this.

  • https://www.mongodb.com/community/forums/t/how-to-save-an-image-in-mongodb-and-use-it-later-in-my-html/243643/4

However, i do believe that there should be a config to save the media or not into the mongo as it can take up alot of storage.

lorenzo132 avatar Mar 24 '24 23:03 lorenzo132

I personally think turning media files into base64 to save those in the mongodb would be the perfect solution for this.

  • https://www.mongodb.com/community/forums/t/how-to-save-an-image-in-mongodb-and-use-it-later-in-my-html/243643/4

However, i do believe that there should be a config to save the media or not into the mongo as it can take up alot of storage.

Note, this would be a breaking change.

lorenzo132 avatar Mar 24 '24 23:03 lorenzo132