Skip to content

Commit 73c3f3f

Browse files
authored
switches to new slack files api
1 parent 0bfe9e7 commit 73c3f3f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/onvif-motion-poll/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ func getAndUploadSnapshot(url, channelID string, slackClient slack.Client) {
9494
return
9595
}
9696

97-
_, err := slackClient.UploadFile(slack.FileUploadParameters{
97+
_, err := slackClient.UploadFileV2Context(slack.UploadFileV2Parameters{
9898
Reader: r.Body,
99+
FileSize: r.ContentLength,
99100
Filetype: "image/png",
100101
Filename: fmt.Sprintf("%s.png", time.Now().Format("20060102150405")),
101102
Channels: []string{channelID},

0 commit comments

Comments
 (0)