1.0.1 • Published 2 years ago

@dotrun/gae-js-storage v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

GAE JS STORAGE

Use Cloud Storage in your app.

Installation

npm install @dotrun/gae-js-storage

Components

StorageProvider

Initialise storage to be accessed elsewhere in your app.

Step 1: Add default bucket to your config

{
  "storageDefaultBucket": "my-test-bucket"
}

Step 2: Initialise storage

// On app startup
storageProvider.init();

Step 3: Use storage

// Anywhere in your app
const storage = storageProvider.get();
const [files] = await storage.bucket("some-bucket").getFiles();

StorageService

Helper service for common tasks

// Create new service instance
const storageService = new StorageService();

// Create upload url to default bucket
const uploadUrl = storageService.getDefaultBucketResumableUploadUrl("newfile.txt");

// Use default bucket
const [files] = await storageService.defaultBucket.getFiles();
1.0.1

2 years ago

1.0.0

2 years ago

0.4.5

2 years ago

0.4.6

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.2.0

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago