0

Does anyone aware of some way to trigger Azure Function having Blob trigger? No matter via API or using "Test/Run" feature.

The case is I need to do that in testing purposes. Currently what I see is one can provide name of the file in blob storage to trigger on. But this is useless as putting file there will trigger function anyway. What I want to do is to provide function with content of the file, not the name, to avoid unnecessary actions.

Unfortunately, Microsoft has poor documentation on all related subjects, but this one has none. The only mention found for 2016 year in this github issue, but it doesn't work now. All my attempts resulted in following error message:

Invalid blob path specified : { my payload }. Blob identifiers must be in the format 'container/blob'

Any clues?

  • "No matter via API or using "Test/Run" feature." this is only valid for HttpTrigger. For Blob trigger you need to use an Azure Storage. – Thiago Custodio Jul 16 '21 at 21:04
  • You cat trigger other types of function via "Test/Run". Actually, any of those, it's just a matter of correct payload. Even more, I've found that the same trigger may be called in not just a single way. There is a code I've found in queue trigger to call it providing string payload – Dmitriy Gluschenko Jul 18 '21 at 08:36

1 Answers1

0

I guess you're mixing the ideas here. Blob Trigger means the function will get executed when a blob is uploaded to the storage account the Azure Function is listening to.

For testing purposes you can use Azurite:

https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Not quite. Azurite us for local testing only. But what I need is to trigger already deployed to Azure function. Its quite easy for all the other trigger types except blob and orchestrated function. On current stage we don't have enough capacity to cover each function with azurite, but need to test some of them in such a way as they are crutial for the flow – Dmitriy Gluschenko Jul 18 '21 at 08:04