Closed dragonpaw closed 7 years ago
Right now, files.upload requires a file on disk, but it would be great if slacker.files.upload would take (and use) a string instead of a filename.
I'm trying to upload files that I grabbed off the web, and being able to have the following work would be great:
import requests slack.files.upload(content=requests.get(url).content) # or slack.files.upload(url=url)
Slacker just mimics the Slack API. We could do the first one, maybe as a separate method. I'm not keen on the second one since I don't think fetching content from web should be a part of the library.
Right now, files.upload requires a file on disk, but it would be great if slacker.files.upload would take (and use) a string instead of a filename.
I'm trying to upload files that I grabbed off the web, and being able to have the following work would be great: