1.50.8 • Published 1 year ago

@nexrender/provider-gs v1.50.8

Weekly downloads
81
License
-
Repository
-
Last release
1 year ago

Provider: GCS

Allows nexrender to interact with a Google Cloud Storage (GCS) bucket.

Refer to @google-cloud/storage for information regarding general abilities and usage.

Installation

npm i @nexrender/provider-gs -g

You most likely need to authenticate to interact with a GCS bucket. This provider uses Application Default Credentials. Refer to the Google Cloud Documentation for more information on authentication.

Usage (download)

To download assets from a GCS bucket, you can use the gs:// prefix in the value of the src attribute.

{
    "assets": [
        {
            "src": "gs://mybucket/background.jpg",
            "type": "image",
            "layerName": "background.png"
        },
        {
            "src": "gs://myotherbucket/audio.mp3",
            "type": "audio",
            "layerName": "theme.mp3"
        }
    ]
}

Uri follows this scheme:

gs://[BUCKET]/[ITEM]

Usage (upload)

Upload via GCS can be done using @nexrender/action-upload

Basic params info:

  • bucket required argument, the GCS bucket
  • item required argument, the item ID
  • contentType optional argument, the content-type of the upload, which will be set as metadata on
  • cacheControl optional argument, the cache-control of the upload, which will be set as metadata on the bucket item
  • resumable boolean, optional argument, disables resumable (true by default) google storage documentation

Example:

{
    "actions": {
        "postrender": [
            {
                "module": "@nexrender/action-upload",
                "input": "result.mp4",
                "provider": "gs",
                "params": {
                    "bucket": "name-of-your-bucket",
                    "item": "folder/output.mp4",
                    "contentType": "video/mp4",
                    "cacheControl": "public, max-age=3600",
                    "resumable": false
                }
            }
        ]
    }
}
1.50.8

1 year ago

1.48.6

1 year ago

1.45.6

2 years ago

1.38.0

3 years ago

1.36.0

3 years ago

1.37.3

3 years ago

1.37.4

3 years ago

1.32.1

4 years ago

1.24.2

4 years ago

1.21.3

5 years ago

1.9.2

6 years ago

1.9.0

6 years ago