Skip to content

Demo for GCS incorrectly uses GCSDataStore #547

Closed

Description

@dpmillerau

line 8 and 14 of demo/server.js incorrectly use GCSDataStore instead of GCSStore
AAnd the whole API call is wrong the the code fails

My Fix

const {Server, EVENTS} = require('@tus/server')
const {GCSStore} = require('@tus/gcs-store')
const {S3Store} = require('@tus/s3-store')
const {FileStore} = require('@tus/file-store')
const {Storage} = require('@google-cloud/storage')

const stores = {
GCSDataStore: () => {
const storage = new Storage( {keyFilename: path.resolve(__dirname, '../keyfile.json')})
return new GCSStore({
bucket: storage.bucket('tus-node-server'),
})
},
....

Activity

  1. dpmillerau commented on Jan 8, 2024

    @dpmillerau
    Author

    also EVENTS are wrong too

  2. fenos commented on Jan 8, 2024

    @fenos
    Collaborator

    @dpmillerau are you able to file a PR with the fix?

  3. dpmillerau commented on Jan 8, 2024

    @dpmillerau
    Author

    For the Events, I haven't worked on that bit, I was trying to reproduce a problem with GCSStore. I just noticed it when nothing got logged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions