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

allow attachment download from slackdump standard export #180

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

limwz01
Copy link
Contributor

@limwz01 limwz01 commented Jan 9, 2024

Partially solves #156 by allowing attachment downloading from slackdump standard export (mattermost format not supported). Note that attachment downloading in the initial view (until a channel/group/dm/mpim is clicked) is not supported currently.

@limwz01
Copy link
Contributor Author

limwz01 commented Jan 9, 2024

Future work is to not extract the attachments from the zip file at the beginning (saves a lot of loading time) and directly return a file stream for the required attachment when downloading.

@limwz01
Copy link
Contributor Author

limwz01 commented Jan 9, 2024

I also had to remove the following line at some point:

info.filename = info.filename.encode("cp437").decode("utf-8")

@hfaran hfaran merged commit 898eec3 into hfaran:master Jan 26, 2024
2 checks passed
@kLy
Copy link

kLy commented May 27, 2024

Hey from what I can understand on this merge, attachments should now be visible after clicking on a particular chat on the left hand side? With 1.4.3 I'm still getting the same errors as before in #156

@limwz01
Copy link
Contributor Author

limwz01 commented May 28, 2024

@kLy it's partially solved. image attachments will still not be visible in the chat view itself (I can't remember why right now), you need to click the broken image to download the attachment.

@kLy
Copy link

kLy commented Jun 10, 2024

Ah gotcha! When I try that though I'm still getting a "500 Internal server error". In the console I get:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/redacted/path/D06U7JF8DSS/attachments/F0710EFFA92-image.png'

When checking the file structure itself, the file is situated at:
'/Users/redacted/path/attachments/F0710EFFA92-image.png'

ie. directly under the export root, without "D06U7JF8DSS".

Thanks! :)

@limwz01
Copy link
Contributor Author

limwz01 commented Jun 11, 2024 via email

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

Successfully merging this pull request may close these issues.

3 participants