We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 128cfe3 commit 31c9973Copy full SHA for 31c9973
1 file changed
functions/v2/imagemagick/index.js
@@ -34,6 +34,12 @@ functions.cloudEvent('blurOffensiveImages', async cloudEvent => {
34
// This event represents the triggering Cloud Storage object.
35
const bucket = cloudEvent.data.bucket;
36
const name = cloudEvent.data.name;
37
+
38
+ if (bucket === BLURRED_BUCKET_NAME) {
39
+ console.log('Event triggered by the blurred bucket; skip to avoid recursion')
40
+ return;
41
+ }
42
43
const file = storage.bucket(bucket).file(name);
44
const filePath = `gs://${bucket}/${name}`;
45
0 commit comments