1

I've created an Azure blob trigger function to compress images in one blob and copy the compressed images to another blob. In the first run it triggered for the existing blobs but when I delete the output blob storage and recreate it, the functioning app does not trigger for existing blobs.

Is there any way I can trigger this function for existing blobs?

Rarblack
  • 4,559
  • 4
  • 22
  • 33

1 Answers1

1

Is there any way I can trigger this function for existing blobs?

In short NO. As you have said, it would only trigger all existing blobs for the first time.

Internally we track which blobs we have processed by storing receipts in our control container azure-webjobs-hosts. Any blob not having a receipt, or an old receipt (based on blob ETag) will be processed (or reprocessed). That's why your existing blobs are being processed for the first time, they don't have receipts.

BlobTrigger is currently designed to ensure that all blobs in a container matching the path pattern are eventually processed, and reprocessed any time they are updated. So after all the blobs have a receipt, when you upload or update blobs, the function will be triggered.

For more details, you could refer to this article.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30