Add an option to locally store files and images instead of hotlinking to cdn.discordapp.com
To maintain support for embedded files with the same name, a local hierarchy version of cdn.discordapp.com should be used.
I've manually constructed some examples of what I could consider the ideal functionality. Click here for a simple chatlog that doesn't use custom emoji or file embeds, and click here for a complex chatlog that does use these features.
This would most likely be implemented as part of #1
A workaround for this is opening the generated HTML file in Chrome and saving it in another folder. It will save all images in a local folder.
I'd like to request this enhancement as well.
I perform the chrome 'Save-As' workaround currently which works fine, It's just another step that needs to be performed that may be able to be removed from my daily chat archive process.
Thanks for considering it.
Was about to request this as well :)
Note: A current workaround I've been using is hosting the HTML files on a local web server and running wget -x -k --mirror -H -Ddiscordapp.com,localhost http://localhost/
This will save all the attachments, avatars, emoji, and other misc files from Discord's servers and convert the links. You'll need to manually change any cdn.discordapp.net thumbnail links that may exist in the logs to clean full resolution media.discordapp.com links before doing this workaround. This is a functional way to get offline logs working though.
For anyone else looking at the wget solution, I had to add a couple more flags (cygwin version, Windows) to get attached images to download:
wget -x -k --mirror -H -Ddiscordapp.com,localhost,cdn.discordapp.com,cdnjs.cloudflare.com -e robots=off -U mozilla http://localhost/
(Easy hosting solution: python -m SimpleHTTPServer 80)
I was getting a lot of robots.txt and no image files without the robots and user agent flags.
Thanks Tyrrrz for the app, works great :)
@wertercatt
I thought the cdn.discordapp.com domain is the one serving full resolution images while media.discordapp.net is for thumbnails? Can anyone confirm this?
@panhartstuff cdn.discordapp.com is correct for full resolution
i'd like to mention that with large channels (almost 60K messages in my instance), trying to save a complete HTML in chrome (the option described here and in the wiki) results in a webpage error, causing a refresh and no file to be made. while using a third party saver called "SingleFile" in firefox results in all my memory being used and then a crash once i put it out of it's misery and close the tab.
for the moment, large amounts of images are impossible to be saved. it would need to be a staggered downloader built into the application
I see. Is there any progress on this?
Nope.
Are there plans to implement this that are being worked on?
Just to give everyone a bit of hope, if this managed to do it, then maybe some good old reverse engineering could give some clues.
https://github.com/Seklfreak/discord-image-downloader-go
Don't worry, it will happen.
Another alternative to the wget options would be to install the SingleFile browser addon, and use it once you have your HTML page open. This method includes all the images inside the HTML file, which is handy, but means it can get pretty big too of course.
@makeworld-the-better-one Does that include the linked images? The wget method is to resolve the full resolution images that aren't embedded in the conversation view, mostly.
Ah good point. That method will recreate the page exactly, but it won't follow links.
Another alternative to the wget options would be to install the SingleFile browser addon, and use it once you have your HTML page open. This method includes all the images inside the HTML file, which is handy, but means it can get pretty big too of course.
@makeworld-the-better-one as i said earlier
using a third party saver called "SingleFile" in firefox results in all my memory being used and then a crash once i put it out of it's misery and close the tab.
it's only useful up to a certain channel size
Most helpful comment
A workaround for this is opening the generated HTML file in Chrome and saving it in another folder. It will save all images in a local folder.