{"id":26569021,"url":"https://github.com/velocityzen/dropbox-stream","last_synced_at":"2025-04-03T03:13:48.993Z","repository":{"id":37664528,"uuid":"77156244","full_name":"velocityzen/dropbox-stream","owner":"velocityzen","description":"Upload \u0026 Download streams for Dropbox","archived":false,"fork":false,"pushed_at":"2023-01-04T21:36:28.000Z","size":653,"stargazers_count":36,"open_issues_count":11,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T20:19:37.612Z","etag":null,"topics":["download","dropbox","nodejs","stream","upload"],"latest_commit_sha":null,"homepage":"","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/velocityzen.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T15:41:50.000Z","updated_at":"2023-10-27T17:23:02.000Z","dependencies_parsed_at":"2023-02-02T20:45:43.936Z","dependency_job_id":null,"html_url":"https://github.com/velocityzen/dropbox-stream","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocityzen%2Fdropbox-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocityzen%2Fdropbox-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocityzen%2Fdropbox-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocityzen%2Fdropbox-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/velocityzen","download_url":"https://codeload.github.com/velocityzen/dropbox-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927839,"owners_count":20856198,"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":["download","dropbox","nodejs","stream","upload"],"created_at":"2025-03-22T20:19:18.449Z","updated_at":"2025-04-03T03:13:48.966Z","avatar_url":"https://github.com/velocityzen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dropbox Stream\n\n[![NPM Version](https://img.shields.io/npm/v/dropbox-stream.svg?style=flat-square)](https://www.npmjs.com/package/dropbox-stream)\n[![NPM Downloads](https://img.shields.io/npm/dt/dropbox-stream.svg?style=flat-square)](https://www.npmjs.com/package/dropbox-stream)\n\nUpload \u0026 Download streams for [Dropbox](https://dropbox.com)\n\n## Install\n\n`npm i dropbox-stream`\n\n## Usage\n\n### Upload\n\nUploads stream to dropbox using upload session API\n\nEvents order:\n\n  1. `progress`\n  2. `metadata`\n\n\n```js\nconst db = require('dropbox-stream');\n\nconst TOKEN = 'put your dropbox token here';\nconst FILETOUPLOAD = '/some/file.txt';\n\nconst up = db.createDropboxUploadStream({\n    token: TOKEN,\n    path: '/test/' + path.basename(FILETOUPLOAD),\n    chunkSize: 1000 * 1024,\n    autorename: true,\n    mode: 'add'\n  })\n  .on('error', err =\u003e console.log(err))\n  .on('progress', res =\u003e console.log(res))\n  .on('metadata', metadata =\u003e console.log('Metadata', metadata))\n\nfs.createReadStream(FILETOUPLOAD).pipe(up)\n  .on('finish', () =\u003e console.log('This fires before metadata!'))\n\n```\n\n### Download\n\nDownloads to stream from dropbox.\n\nEvents order:\n\n  1. `metadata`\n  2. `progress`\n\n\n```js\nconst db = require('dropbox-stream');\n\nconst TOKEN = 'put your dropbox token here';\nconst FILETODOWNLOAD = '/some/file.txt';\nconst FILETODOWNLOADTO = './file.txt';\n\ndb.createDropboxDownloadStream({\n    token: TOKEN,\n    path: FILETODOWNLOAD\n  })\n  .on('error', err =\u003e console.log(err))\n  .on('metadata', metadata =\u003e console.log('Metadata', metadata))\n  .on('progress', res =\u003e console.log(res))\n  .pipe(fs.createWriteStream(FILETODOWNLOADTO))\n  .on('finish', () =\u003e console.log('Done!'));\n\n```\n\nIf you want to download a file from shared link use:\n\n```js\ndb.createDropboxDownloadStream({\n  token: TOKEN,\n  url: 'sharedlink',\n  path: 'optional file path if shared link is for a folder'\n})\n```\n\nLicense MIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocityzen%2Fdropbox-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelocityzen%2Fdropbox-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocityzen%2Fdropbox-stream/lists"}