@google-cloud-suite/cloud-functions-storage-upload
TypeScript icon, indicating that this package has built-in type declarations

0.0.31 • Public • Published

@google-cloud-suite/cloud-functions-storage-upload

Upload file to storage via functions

  1. Install
npm install @google-cloud-suite/cloud-functions-cloud-functions-storage-upload
  1. Handle stroage trigger

You can use handle(params?: InitParams) to initialize trigger. The followings are the property of InitParams:

  • bucketName: string
  • clientSecret?: string
    • defaults: undefined
  • keyPrefix?: string
    • defaults: undefined

Examples:

  • Using event target bucket for both source and destination.
const storageUpload = require("@google-cloud-suite/cloud-functions-storage-upload");
exports.upload = storageUpload.handle();
  1. Deploy
gcloud functions deploy upload \
--runtime nodejs14 \
--project YOUR_PROJECT

Readme

Keywords

none

Package Sidebar

Install

npm i @google-cloud-suite/cloud-functions-storage-upload

Weekly Downloads

1

Version

0.0.31

License

MIT

Unpacked Size

8.76 kB

Total Files

4

Last publish

Collaborators

  • nabeix