-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Unable to update the FileType using files.remote.update #1355
Copy link
Copy link
Open
Description
What happened
Unable to update fileType using files.remote.update
Expected behavior
FileType should be changed from gif to png
Steps to reproduce
In my usecase i have uploaded a gif file and then i am updating it with png file using files.remote.update API but the png image is showing as blurred after update and after downloading it is coming as gif.
reproducible code
uploads := slack.UploadFileV2Parameters{
Filetype: "auto",
Filename: "Loading...",
FileSize: int(fileSize),
Reader: fileBuffer,
Channels: []string{n.BotEvent.ChannelID},
Channel: n.BotEvent.ChannelID,
ThreadTimestamp: n.BotEvent.ThreadTimeStamp,
Title: appMentionTmpl.Title,
//InitialComment: appMentionTmpl.InitialComment,
}
uploadResp, er := n.Messenger.CompleteUploadExternal(ctx, uploads)
payload := slack.RemoteFileParameters{
Filetype: "png",
ExternalID: uuid.New().String(),
Title: appMentionTmpl.Title,
PreviewImage: text,
PreviewImageReader: nlsObject.Reader,
}
_, err = n.Messenger.UpdateRemoteFile(ctx, n.FileID, payload)
Versions
- Go: v1.22.6
- slack-go/slack: v0.14.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels