Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files are missing after import #1

Open
SiriusGale opened this issue Oct 27, 2022 · 1 comment
Open

Files are missing after import #1

SiriusGale opened this issue Oct 27, 2022 · 1 comment

Comments

@SiriusGale
Copy link

SiriusGale commented Oct 27, 2022

Problem

After importing you are loosing all files you had in your original channels
When you click on it it starts to download but even after that you can't open it locally, files are broken.

I'v created a separated channel for test. In original workspace it looks like that
https://user-images.githubusercontent.com/83001423/198271449-eeb83aff-ea6d-47de-927c-6a9430909bc2.png

But in imported channel it looks like that
https://user-images.githubusercontent.com/83001423/198280341-0e15aeba-cd6d-4065-8225-33e66e1af489.png

Problem is that Slack does not allow you to open original URL's of file if you are not authorized or if you don't use token

So this is how it looks like in messages.json

        "url_private": "https://files.slack.com/files-pri/TQ0GMPM18-F049FV5U8MN/112.png",
        "url_private_download": "https://files.slack.com/files-pri/TQ0GMPM18-F049FV5U8MN/download/112.png",
        "original_h": 112,
        "original_w": 112,
        "thumb_64": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_64.png",
        "thumb_80": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_80.png",
        "thumb_160": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_160.png",
        "thumb_360": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_360.png",

And how it should be

        "url_private": "https://files.slack.com/files-pri/TQ0GMPM18-F049FV5U8MN/112.png?t=xoxe-TOKEN#2",
        "url_private_download": "https://files.slack.com/files-pri/TQ0GMPM18-F049FV5U8MN/download/112.png?t=xoxe-TOKEN#2",
        "original_h": 112,
        "original_w": 112,
        "thumb_64": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_64.png?t=xoxe-TOKEN#2",
        "thumb_80": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_80.png?t=xoxe-TOKEN#2",
        "thumb_160": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_160.png?t=xoxe-TOKEN#2",
        "thumb_360": "https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_360.png?t=xoxe-TOKEN#2",

This is how it works in native slack-export and how it's json looks like

Workaround

There is a little script which you can use to insert your xoxe-token into messages.json to save your files in imported channel
https://github.com/SiriusGale/slack-backup-token-inserter

Way to fix

  1. In config.yaml we should add a new variable to get an opportunity to add xoxe-token
  2. xoxe-token should be added to all file links like that
    https://files.slack.com/files-tmb/TQ0GMPM18-F049FV5U8MN-6e2787ad09/112_360.png?t=xoxe-TOKEN#2
@SiriusGale
Copy link
Author

SiriusGale commented Oct 31, 2022

Added Workaround and Way to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant