1.0.1-alpha.154 • Published 8 months ago

@deepkit/filesystem-google v1.0.1-alpha.154

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Deepkit Google Storage Storage adapter

import { Storage } from '@deepkit/filesystem';
import { StorageGoogleAdapter } from '@deepkit/filesystem-google';

const storage = new Storage(new StorageGoogleAdapter({
    bucket: 'my-bucket',
    path: 'my-path/',
    projectId: 'my-project-id',
    
    keyFilename: '/path/to/keyfile.json',
    //or
    credentials: {
        client_email: '...',
        private_key: '...',
    }
}));

const files = await storage.files();
await storage.write('test.txt', 'hello world');