I assume you are running your OpenFaaS server on
http://127.0.0.1:31112
. If not please change the URL in code to your own OpenFaaS server URL.
- Generate a Firebase private key from firebase console and your project setting to initialize the SDK.
- Copy the service account key file into
storage
folder with the nameserviceAccountKey.json
. - Change the bucket name(
bucket_name
) instack.yml
file environment variable to your firebase bucket name. - Build and deploy the function:
faas up
You can test your function with upload.html file. In response you will have the url to access to your file.