Comments (3)
Hi @psyciknz. It's fixed in #137. Thanks.
from slacker.
Thanks. So trying to work on it.
The image as being downloaded. I've tried:
image = requests.get(imageurl, stream=True).content
image = requests.get(imageurl, stream=True).raw
as input to:
slack.files.upload(content=image,title=text,channels=slack.channels.get_channel_id(channelname))
As part of the code, do you know which method I should be able to use?
My last test I used the content
of the request object, and the "image" that slack shows seems to be a test representation of a binary object:
D+17S%BAD+B1BAD+B9ZBAD+9BAD+7 jBAD+3FBAD+93'zBAD+ADڲ
3UBAD+AEBAD+AABAD+80Ңm@<BAD+A2BAD+93Cި)BAD+35BAD+9qIaJBAD+1A8%zBAD+8DBAD+8zBAD+89BAD+A0BAD+A35ThRBAD+A0 M*5;BAD+15(BAD+A8AmO5BAD+89BAD+A5zBAD+A0yBAD+AYBAD+D
HJ֩ ڳBAD+93bISBAD+C:VJTBAD+15F;RAYêBAD+8C
from slacker.
Hmm I may have figured it out. It does seem to post an FAILED or TIMEOUT exception. But:
image = requests.get(imageurl, stream=True)
slack.files.upload(file_=image.raw,title=text,channels=slack.channels.get_channel_id(channelname))
Seems to work.
from slacker.
Related Issues (20)
- Slack Token? Webhook URL? HOT 2
- files.upload: doesn't support thread_ts HOT 1
- File.upload - supports as_user? HOT 1
- Issue uploading files with a unicode filename
- Files libexec/punjab.tac, crossdomain.xml, etc are written into plist, but aren't installed
- SSL: CERTIFICATE_VERIFY_FAILED behind proxy HOT 5
- Enabling Meetup preview HOT 2
- Renaming in 0.13 breaks slacker-cli HOT 2
- Fedora package HOT 1
- on error in "__init__.BaseAPI()", only the error text is shown, not the error details, unlike Slack's API Tester HOT 2
- How to add a thread message if using slacker HOT 1
- Add support for Analytics (Stats) API
- add support for remote files
- please add the testcases for each class
- Can't send messages with blocks HOT 1
- How to get a list of all users? HOT 1
- Missing Request Mime types HOT 2
- Issuing new legacy token is deprecated HOT 3
- Error handling of slacker.Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slacker.