In the Query results, look for a log entry that starts with file: and click it.
In the first dropdown, filter your results to Cloud Run Revision and click Add.Once the upload is done, return to your Cloud Console tab, open the navigation menu, and select Logging from under the Operations section.Gsutil -m cp gs://spls/gsp644/* gs://$GOOGLE_CLOUD_PROJECT-upload Copy some test files into your upload bucket:.Gcloud beta pubsub subscriptions create pdf-conv-sub -topic new-doc -push-endpoint=$SERVICE_URL if the Cloud Run service is triggered when files are uploaded to Cloud Storage
CLOUD CONVERT PUB TO PDF PDF
CLOUD CONVERT PUB TO PDF CODE
CLOUD CONVERT PUB TO PDF INSTALL
Npm install To build and deploy the REST API, use Google Cloud Build. Now run the following commands in Cloud Shell to install the packages that your conversion script will be using:.Then change your current working directoryĬd Build-a-Serverless-App-with-Cloud-Run-that-Creates-PDF-Files.Open a new Cloud Shell session and run the following command to clone the Pet Theory repository:.The notifications will be labeled with the topic “new-doc”. Gsutil notification create -t new-doc -f json -e OBJECT_FINALIZE gs://$GOOGLE_CLOUD_PROJECT-upload In Cloud Shell run the following command to tell Cloud Storage to send a Pub/Sub notification whenever a new file has finished uploading to the docs bucket:.Gsutil mb gs://$GOOGLE_CLOUD_PROJECT-processed And another bucker for the processed PDFs:.Gsutil mb gs://$GOOGLE_CLOUD_PROJECT-upload Run the following command to create a bucket in Cloud Storage for the uploaded docs:.
Trigger your Cloud Run service when a new file is uploaded Your Console should now resemble the following: