diff --git a/gcsstore/gcsstore.go b/gcsstore/gcsstore.go index 589ef19..075cd86 100644 --- a/gcsstore/gcsstore.go +++ b/gcsstore/gcsstore.go @@ -14,13 +14,14 @@ import ( "bytes" "encoding/json" "fmt" - "golang.org/x/net/context" "io" "strconv" "strings" "sync" "sync/atomic" + "golang.org/x/net/context" + "cloud.google.com/go/storage" "github.com/tus/tusd" "github.com/tus/tusd/uid" @@ -32,6 +33,11 @@ type GCSStore struct { // Specifies the GCS bucket that uploads will be stored in Bucket string + // ObjectPrefix is prepended to the name of each GCS object that is created. + // It can be used to create a pseudo-directory structure in the bucket, + // e.g. "path/to/my/uploads". + ObjectPrefix string + // Service specifies an interface used to communicate with the Google // cloud storage backend. Implementation can be seen in gcsservice file. Service GCSAPI