slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.6k stars 1.11k forks source link

Fix UploadFileV2 when using text content #1291

Closed calebmckay closed 1 month ago

calebmckay commented 1 month ago

Fixes #1290.

postWithMultipartResponse works better for uploading this way, per the Slack docs.

POST the contents of your file to the URL returned in step 1. This can be done by sending the raw bytes, or can be a multipart form ended request. If all went well, Slack will respond with an HTTP 200.

kalavt commented 1 month ago

@calebmckay can we merge?