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

block/type/image should allow image_url to reference an uploaded file to Slack without having to make it public #1444

Open
1 of 9 tasks
rmilkowski opened this issue Dec 22, 2023 · 2 comments

Comments

@rmilkowski
Copy link

(Describe your issue and goal here)

This should work:

  1. upload an image with client.files_upload_v2(), do not want it to be visible in a channel
  2. chat_postMessage(blocks=type: image, image_url: file.private_url ...)

This currently doesn't work unless the file/image is made public via client.files_sharedPublicURL(), but enabling public files is not an option in many organisations. Additionally one shouldn't have to construct urls by extracting pub_secret from file/permalink_public.

Given that slack client can show uploaded images (even when they are not public), it should also work with blocks/type/image.

Example discussion/solution (with making the file public) - https://stackoverflow.com/questions/58186399/how-to-create-a-slack-message-containing-an-uploaded-image

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@seratch
Copy link
Member

seratch commented Dec 24, 2023

Hi @rmilkowski, thanks for writing in. At this moment, there is no solution for your use case. However, our platform team is currently working on a new feature! I cannot tell when the feature will be available yet, but once it's publicly available, this SDK will support it.

@rmilkowski
Copy link
Author

Any progress?

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

No branches or pull requests

2 participants