GithubHelp home page GithubHelp logo

Comments (3)

os avatar os commented on June 19, 2024

Hi @psyciknz. It's fixed in #137. Thanks.

from slacker.

psyciknz avatar psyciknz commented on June 19, 2024

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.

psyciknz avatar psyciknz commented on June 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.