@cognitiveproof/softbinding-api-plugin-gcp-bucket
v1.0.1
Published
Google Cloud Storage object store plugin for the C2PA Soft Binding Resolution API server
Readme
@cognitiveproof/softbinding-api-plugin-gcp-bucket
Google Cloud Storage ObjectStorePlugin for @cognitiveproof/softbinding-api-server — the C2PA Soft Binding Resolution API server.
Stores arbitrary binary blobs (e.g. assets referenced by byReference) in two GCS buckets — a private "data" bucket and a "public" bucket served via signed/public URLs.
Install
npm install @cognitiveproof/softbinding-api-server @cognitiveproof/softbinding-api-plugin-gcp-bucketUsage
import { createServer, loadObjectStore } from '@cognitiveproof/softbinding-api-server';
const objectStore = loadObjectStore('@cognitiveproof/softbinding-api-plugin-gcp-bucket');Or pass the package name via the OBJECTSTORE_PLUGIN environment variable.
Note:
createServer()does not callloadObjectStore()automatically — no bundled route currently needs blob storage. UseloadObjectStore()directly in your own routes/middleware if you need it.
Configuration
| Env var | Required | Description |
| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DATA_BUCKET_NAME | Yes | Name of the private GCS bucket used for saveData/loadData/deleteData |
| PUBLIC_BUCKET_NAME | Yes | Name of the GCS bucket used for savePublicData/loadPublicData/getPublicUrl |
| GOOGLE_BUCKET_CREDENTIAL | No | JSON service account credentials (as a JSON string). If unset, uses Application Default Credentials. |
