Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload file #62

Closed
andrewfsmith opened this issue Jul 8, 2014 · 15 comments
Closed

upload file #62

andrewfsmith opened this issue Jul 8, 2014 · 15 comments

Comments

@andrewfsmith
Copy link

Is there a way to upload a file to slack?
I see how to send messages and links, but I want to upload a local image as an attachment.
Is this possible?

@andrewfsmith
Copy link
Author

Thanks, that would be great.

On 8 July 2014 14:20, Sergey Balbeko notifications@github.com wrote:

Yes, there is an api call for that
https://api.slack.com/methods/files.upload
I'll take a look, and probably will submit PR soon


Reply to this email directly or view it on GitHub
#62 (comment)
.

@timothyandrew
Copy link

+1

1 similar comment
@vcastellm
Copy link

+1

@technicalpickles
Copy link
Contributor

It doesn't look like this is supported currently. I think it'd require a few things to get going. For reference, here is the file upload API: https://api.slack.com/methods/files.upload

At that point in a script, you'd be able to call robot.adapter.upload (or whatever it's called).

For the bonus round, could look at adding explicit uploading support to hubot. At least Campfire supports it, so if there's 2 adapters would have use for it, I'm cool with seeing that in hubot upstream.

@ChrisLundquist
Copy link

After taking a look at https://api.slack.com/methods/files.upload
It looks like there is an error "User is bot", which might be why this never made it into the adapter.
I would guess that using a real user's API token, might be a work around.
screen shot 2015-07-09 at 12 31 51 pm

@vcastellm
Copy link

I asked slack support about this and the recommended way to do it is using a non bot user.

@technicalpickles
Copy link
Contributor

cc hubotio/hubot#996 where there's some discussion around adding a method to hubot adapters for uploading files

@aaronthebaron
Copy link

It looks like they've recently changed this policy and now bot users are allowed to upload files:
screen shot 2016-01-05 at 2 24 00 pm

I can confirm this is possible using the files upload API: https://api.slack.com/methods/files.upload

@santiycr
Copy link

santiycr commented Feb 4, 2016

+1

1 similar comment
@jiang-wei
Copy link

+1

@halkeye
Copy link

halkeye commented Feb 5, 2016

I feel like slackapi/node-slack-sdk#56 should be a priority to get merged, the code is written up it just looks like the PR has fallen silent.

@halkeye
Copy link

halkeye commented Feb 7, 2016

@technicalpickles do we have any sort of standard for uploadFile? or do you want me to make up one like I did for emote?

I have a PR in for idoshamun/node-slack-upload#2 which mostly works anyways, I was going to write a stub/fill for response.uploadFile using that for now.

@technicalpickles
Copy link
Contributor

@halkeye there isn't. There is discussion in hubotio/hubot#1036 about more 'types'. I think uploadFile makes sense though.

@sheluchin
Copy link

+1

@DEGoodmanWilson
Copy link

This will be fixed in #309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests