RocketChat / RocketChat/Rocket.Chat
[BUG] Slack File Upload only works one way and images don't share
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I have a Rocket.Chat server that has SlackBridge enabled, and would like to be able to share files and images on both ends. I am able to share files from Rocket.Chat to Slack, but not the other way around. I cannot send images from Rocket.Chat to Slack as I have public image access disabled on Rocket.Chat, and am not sure how to provide access the other way around.
Steps to reproduce:
- Connect to a Slack instance via SlackBridge
- Send a file and an image from Rocket.Chat
- Send a file and an image from Slack
Expected behavior:
The images should be viewable on both platforms, and the files should be downloadable from both platforms.
Actual behavior:
The Slack instance can't show the images as it is received as a link to my Rocket.Chat instance. The Slack instance can receive my file, however. The Rocket.Chat instance cannot receive a file or an image without prompting the user to sign into the Slack instance.
Server Setup Information:
- Version of Rocket.Chat Server: 4.6.3 (due for an upgrade soon)
- Operating System: Ubuntu
- Deployment Method: snap
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.18.3
- MongoDB Version: 5.0.6
Client Setup Information
- Desktop App or Browser Version: Chrome 102.0.5005.61
- Operating System: macOS Monterey
Additional context
Ideally, Slack's bot could utilize the file endpoint in its API to upload and receive files and images (along with accessible URLs to both of them). For instance, if I uploaded an image onto Rocket.Chat, the bot would call the files.remote.add to upload the image using a private Rocket.Chat image URL that isn't accessible directly, so that Slack would "host" the image for us. On the other hand, when a message is received from Slack and it contains a file, we could call something like files.info to get a public link to the file.
These are just some thoughts I put together, and probably aren't totally accurate to how Slack's bot API might actually work.
Relevant logs:
No relevant logs at the moment.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files, tests, or entry points are named. Start by tracing SlackBridge handling for file and image transfers in both directions, then reproduce the reported cases and verify that images are viewable and files downloadable without requiring sign-in.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100