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

file upload example is broken #310

Closed
3 tasks
aoberoi opened this issue Jan 9, 2017 · 1 comment
Closed
3 tasks

file upload example is broken #310

aoberoi opened this issue Jan 9, 2017 · 1 comment
Labels
docs M-T: Documentation work only good first issue
Milestone

Comments

@aoberoi
Copy link
Contributor

aoberoi commented Jan 9, 2017

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Description

The example found at https://slackapi.github.io/node-slack-sdk/basic_usage#uploading-a-file does not work. "fs.createReadStream(filePath) should be fs.createReadStream(fileName)" (thanks @mhahn)

Reproducible in:

node slack sdk version: *
OS version(s): *
Device(s): *

Steps to reproduce:

  1. Try the example code, witness failure.

Expected result:

a file to be uploaded successfully

Actual result:

runtime failure

@aoberoi aoberoi added docs M-T: Documentation work only Priority—Medium labels Jan 9, 2017
@clavin
Copy link
Contributor

clavin commented Jan 9, 2017

I believe the description given isn't fully accurate: fs.createReadStream(filePath) should indeed be itself, but filePath should instead point to a file rather than a directory.

The file name and path are different (or at least can be, and that should be shown off) so the change should definitely not remove the filePath variable.

Just clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only good first issue
Projects
None yet
Development

No branches or pull requests

2 participants