GCSFS
GCSFS provides an mz/fs comaptible virtual fs that uses @google-cloud/storage as a backend.
GCSFS supports only a limited subset of the standard fs methods and only supports async promise based access.
Creating a new GCSFS instance
const GCSFS = require('gcsfs')
var gcsfs = new GCSFS({
bucketName: 'test-bucket',
keyFile: 'my-key-file.json',
})
Options
Property | Description |
---|---|
createBucket | if true bucket will be created if does not exist |
credentials | credentials object |
defaultGzip | uploads will be gzip'd if set to true |
defaultPublic | files will be public if set to true |
keyFile | google cloud key file |
projectId | project id - not needed if in key file or credentials |