slackapi / slackapi/python-slack-sdk
block/type/image should allow image_url to reference an uploaded file to Slack without having to make it public
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 4k
- Forks
- 857
- Ø Merge
- 22 Std. 21 Min.
- Gemergte PRs (30 T.)
- 16
Beschreibung
(Describe your issue and goal here)
This should work:
- upload an image with client.files_upload_v2(), do not want it to be visible in a channel
- 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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei slack_sdk.models und konzentriere dich auf den Builder für Image-Blöcke sowie darauf, wie dessen Wert image_url dargestellt wird. Überprüfe das Verhalten mit einer privat hochgeladenen Slack-Datei und betrachte die Arbeit als abgeschlossen, wenn der Block auf diese Datei verweisen kann, ohne sie öffentlich zu machen oder manuell eine öffentliche URL zu extrahieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100