{"id":16368830,"url":"https://github.com/idoshamun/node-slack-upload","last_synced_at":"2025-03-23T02:33:41.688Z","repository":{"id":29856270,"uuid":"33401187","full_name":"idoshamun/node-slack-upload","owner":"idoshamun","description":"Node module for uploading files to slack using multipart or string","archived":false,"fork":false,"pushed_at":"2023-03-04T04:21:32.000Z","size":475,"stargazers_count":11,"open_issues_count":7,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-14T14:34:04.533Z","etag":null,"topics":["files","javascript","nodejs","slack","upload"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idoshamun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-04T09:56:10.000Z","updated_at":"2023-09-08T16:56:22.000Z","dependencies_parsed_at":"2024-06-18T18:38:03.479Z","dependency_job_id":null,"html_url":"https://github.com/idoshamun/node-slack-upload","commit_stats":{"total_commits":34,"total_committers":6,"mean_commits":5.666666666666667,"dds":0.4411764705882353,"last_synced_commit":"073bbba5d432e9d2fb94d19480814ce4a98596c3"},"previous_names":["elegantmonkeys/node-slack-upload"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoshamun%2Fnode-slack-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoshamun%2Fnode-slack-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoshamun%2Fnode-slack-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoshamun%2Fnode-slack-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idoshamun","download_url":"https://codeload.github.com/idoshamun/node-slack-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221842955,"owners_count":16890232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["files","javascript","nodejs","slack","upload"],"created_at":"2024-10-11T02:53:54.323Z","updated_at":"2024-10-28T14:47:24.073Z","avatar_url":"https://github.com/idoshamun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-slack-upload\n\u003e A node module for uploading files to slack using multipart or string\n\n[Slack](https://slack.com/) is a messaging platform that is easy to integrate with.\nThis module should be useful for for uploading files to Slack!\n\n## Install\n\nnode-slack-upload is available via npm:\n\n```\nnpm install node-slack-upload\n```\n\n## Usage\n\nGet your Slack api token from [here](https://api.slack.com/web).\n\n```\nvar Slack = require('node-slack-upload');\nvar slack = new Slack(token);\n```\n\nTo upload a file from the filesystem as a post\n```\nslack.uploadFile({\n\tfile: fs.createReadStream(path.join(__dirname, '..', 'README.md')),\n\tfiletype: 'post',\n\ttitle: 'README',\n\tinitialComment: 'my comment',\n\tchannels: 'XXXXX'\n}, function(err, data) {\n\tif (err) {\n\t\tconsole.error(err);\n\t}\n\telse {\n\t\tconsole.log('Uploaded file details: ', data);\n\t}\n});\n```\n\nTo upload a file from a string as a post\n```\nslack.uploadFile({\n\tcontent: 'My file contents!',\n\tfiletype: 'post',\n\ttitle: 'README',\n\tinitialComment: 'my comment',\n\tchannels: 'XXXXX'\n}, function(err, data) {\n\tif (err) {\n\t\tconsole.error(err);\n\t}\n\telse {\n\t\tconsole.log('Uploaded file details: ', data);\n\t}\n});\n```\nFor more details please refer [https://api.slack.com/methods/files.upload](https://api.slack.com/methods/files.upload)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidoshamun%2Fnode-slack-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidoshamun%2Fnode-slack-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidoshamun%2Fnode-slack-upload/lists"}