@tus/gcs-store
👉 Note: since 1.0.0 packages are split and published under the @tus
scope.
The old package, tus-node-server
, is considered unstable and will only receive security fixes.
Make sure to use the new packages, currently in beta at 1.0.0-beta.1
.
Contents
Install
In Node.js (16.0+), install with npm:
npm install @tus/gcs-store
Use
const {Server} = require('@tus/server')
const {GCSStore} = require('@tus/gcs-store')
const server = new Server({
path: '/files',
datastore: new GCSStore({
projectId: 'id',
keyFilename: path.resolve('./some-path', 'keyfile.json'),
bucket: 'tus-node-server-ci',
}),
})
API
This package exports GCSStore
. There is no default export.
new GCSStore(options)
Creates a new Google Cloud Storage store with options.
options.projectId
The GCS project ID (string
).
options.keyFilename
Path to the keyfile with credentials (string
).
options.bucket
The bucket name.
Extensions
The tus protocol supports optional extensions. Below is a table of the supported extensions in @tus/gcs-store
.
Types
This package is fully typed with TypeScript.
Compatibility
This package requires Node.js 16.0+.
Contribute
See contributing.md
.
License
MIT © tus