# Google cloud platform ## 誤刪 default compute service account: 30 天內用 gcloud 加回來 ``` gcloud iam service-accounts undelete "115754855009870202382" --project=play-and-swim ``` >https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-default-service-accounts ## Cloud run 監聽偵測 Storage bucket 並 log 印出 function: ``` const functions = require('@google-cloud/functions-framework'); // CloudEvent callback that will be triggered by Cloud Storage. functions.cloudEvent('students', cloudEvent => { const file = cloudEvent.data; // 檢查文件類型是否為 CSV if (file && file.name.endsWith('.csv')) { console.log(`新上傳的 CSV 檔案名稱: ${file.name}`); } else { console.log("未檢測到新上傳的 CSV 文件或文件類型不符"); } }); ``` Log: 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up