Skip to content

Commit

Permalink
chore: Adding Deprecation Notice for files.upload (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzoaiello authored Jul 15, 2024
1 parent ef53c0c commit 5094cdf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions files.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,16 @@ func (api *Client) ListFilesContext(ctx context.Context, params ListFilesParamet
return response.Files, &params, nil
}

// UploadFile uploads a file
// UploadFile uploads a file.
// DEPRECATED: Use UploadFileV2 instead. This will stop functioning on March 11, 2025.
// For more details, see: https://api.slack.com/methods/files.upload#markdown
func (api *Client) UploadFile(params FileUploadParameters) (file *File, err error) {
return api.UploadFileContext(context.Background(), params)
}

// UploadFileContext uploads a file and setting a custom context
// UploadFileContext uploads a file and setting a custom context.
// DEPRECATED: Use UploadFileV2Context instead. This will stop functioning on March 11, 2025.
// For more details, see: https://api.slack.com/methods/files.upload#markdown
func (api *Client) UploadFileContext(ctx context.Context, params FileUploadParameters) (file *File, err error) {
// Test if user token is valid. This helps because client.Do doesn't like this for some reason. XXX: More
// investigation needed, but for now this will do.
Expand Down

0 comments on commit 5094cdf

Please sign in to comment.