Skip to content

Commit

Permalink
Merge pull request #938 from lch88/fix-missing-token-when-file-upload
Browse files Browse the repository at this point in the history
Add missing token values when uploading a file
  • Loading branch information
kanata2 committed May 10, 2021
2 parents 045896a + 632f3a6 commit 0c3c3c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ func (api *Client) UploadFileContext(ctx context.Context, params FileUploadParam
}
if params.Content != "" {
values.Add("content", params.Content)
values.Add("token", api.token)
err = api.postMethod(ctx, "files.upload", values, response)
} else if params.File != "" {
err = postLocalWithMultipartResponse(ctx, api.httpclient, api.endpoint+"files.upload", params.File, "file", api.token, values, response, api)
Expand Down

0 comments on commit 0c3c3c7

Please sign in to comment.