grundleborg / slack-advanced-exporter

A tool for exporting additional data from Slack that is missing from the official data export.
MIT License
95 stars 18 forks source link

File attachments not working #29

Closed XiaoKe89 closed 1 year ago

XiaoKe89 commented 1 year ago

After downloading the attachments and importing into mattermost the attachments don't show up, I checked the folder that it downloaded all the attachments to and they all seem to be corrupted as none of them will open properly.

I'm using the tool in windows powershell and my mattermost server is hosted on an Unraid server

XiaoKe89 commented 1 year ago

Just additional information, I am using a third party tool "Backupery for slack" so that I can get the DMs and private channels as well as the public channels. Using the zip generated from Backupery I can successfully get all the messages and channels but just the file attachments don't get imported. Not sure if this is something Backupery needs to add on their end or if it's on your end. I sent an email to Backupery to get their input as well. If I need to put this issue somewhere else please let me know!

XiaoKe89 commented 1 year ago

Update, After checking with the dev of Backupery I was able to get the images to download but it's still not working, I'm not getting any errors during the process just none of the files are being uploaded for some reason

XiaoKe89 commented 1 year ago

Another update, finally got it working I had accidentally added another folder causing it to not work. Adding details on what my steps were in case anyone else sees this in the future and is trying to migrate from slack to mattermost using backupery.

In backupery you will want to select all the items you want to export (I just did everything but you can filter out stuff you don't want as well) then under "convert to what" you want to select "Slack Standard JSON" archive" and "Comfortable HTML" then hit export now. Once finished you will have a couple of folders "Ready to import" and "HTML2". "Ready to import" will have the slack archive file which you can use in place of the official slack export file. Follow the steps found in the mattermost docs up to step number 4, you will need to replace the attachment files that were downloaded with the advanced exporter tool with the ones in the "HTML2" folder from backupery, the files from backupery will need to be manually edited as it appends a date to the begining which will cause errors so you will need to remove the dates as well as potentially adjust some of the file names if you compare the files with the ones downloaded from the advanced exporter tool that will make it a bit easier to see what needs changing. Once you have that go ahead and follow step 4 to get your zip file. Before uploading it into mattermost and importing the datat run the mmctl command: "mmctl import validate import_file.zip --team myteam" replacing "import_file.zip" with the name of your zip file and "myteam" with your team name. This command will let you know if there is any issues with the files and you can use the errors it gives to make adjustments as needed. Once it all looks good you can then proceed with uploading and importing the file and it all should work, all your slack channels (including private channels), DMs, and file attachments should now be in your mattemost team.

Since I resolved this I'm closing the issue