How to upload an image to Slack using node.js on Windows?
问题 I'm trying to upload an image via Slack using node.js and the request package, but not having much luck. Either I receive invalid_array_arg or no_file_data errors from the API. Here is my request: var options = { method: 'POST', url: 'https://slack.com/api/files.upload', headers: { 'cache-control': 'no-cache', 'content-type': 'application/x-www-form-urlencoded' }, form: { token: SLACK_TOKEN, channels: SLACK_CHANNEL, file: fs.createReadStream(filepath) } }; request(options, function (error,