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

Error Sending File to a User #20

Open
dmil opened this issue Oct 26, 2016 · 1 comment
Open

Error Sending File to a User #20

dmil opened this issue Oct 26, 2016 · 1 comment

Comments

@dmil
Copy link

dmil commented Oct 26, 2016

I tried this
slackcli -t xxxx-xxx-xxx-xx -a -d @user --file filename.csv -m "message"

and this
slackcli -t xxxx-xxx-xxx-xx -a -d @user --file /full/path/to/file/filename.csv -m "message"

for both I get the following error

/usr/local/lib/node_modules/slack-cli/node_modules/form-data/lib/form_data.js:217`
var filename = options.filename || value.name || value.path;
^

TypeError: Cannot read property 'name' of undefined
at FormData._getContentDisposition (/usr/local/lib/node_modules/slack-cli/node_modules/form-data/lib/form_data.js:217:43)
at FormData._multiPartHeader (/usr/local/lib/node_modules/slack-cli/node_modules/form-data/lib/form_data.js:171:33)
at FormData.append (/usr/local/lib/node_modules/slack-cli/node_modules/form-data/lib/form_data.js:64:21)
at appendFormValue (/usr/local/lib/node_modules/slack-cli/node_modules/request/request.js:327:21)
at Request.init (/usr/local/lib/node_modules/slack-cli/node_modules/request/request.js:338:11)
at new Request (/usr/local/lib/node_modules/slack-cli/node_modules/request/request.js:128:8)
at request (/usr/local/lib/node_modules/slack-cli/node_modules/request/index.js:54:10)
at Function.post (/usr/local/lib/node_modules/slack-cli/node_modules/request/index.js:62:12)
at post (/usr/local/lib/node_modules/slack-cli/bin/cmd.js:124:24)
at Array.async.auto.uploadFile (/usr/local/lib/node_modules/slack-cli/bin/cmd.js:380:13)

@dmil
Copy link
Author

dmil commented Oct 26, 2016

Update: This is only an issue with sending message to a user, works fine if I send to a group

slackcli -t xxxx-xxx-xxx-xx -a -h group_name --file /full/path/to/file/filename.csv -m "message"

works fine. But messaging to a user still doesn't seem to work.

@dmil dmil changed the title Error Sending File Error Sending File to a User Oct 26, 2016
mcorcuera pushed a commit to mcorcuera/slack-cli that referenced this issue Jan 25, 2017
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

2 participants
@dmil and others