Skip to content

Commit 13f4373

Browse files
committed
Add support for files.upload API call.
Closes slackapi#64, slackapi#88.
1 parent eabfc26 commit 13f4373

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

slackclient/_slackrequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ def do(token, request="?", post_data=None, domain="slack.com"):
1616

1717
url = 'https://{0}/api/{1}'.format(domain, request)
1818
post_data['token'] = token
19+
files = {'file': post_data.pop('file')} if 'file' in post_data else None
1920

20-
return requests.post(url, data=post_data)
21+
return requests.post(url, data=post_data, files=files)

0 commit comments

Comments
 (0)