Hello @Luke Osborn
There might be a few things that you can check to ensure that the trigger is working as expected:
- Make sure that the connection string you are using is correct and that it has the necessary permissions to access the blob storage account.
- Check if the container and sub-folder names are correct and that the blob you are trying to trigger on is located in the correct sub-folder.
- Ensure that the file name format is correct. The documentation specifies that the file name should start with the specified substring, so make sure that the file name starts with "my-substring-" and that there are no typos or extra characters. If you have checked all of the above and the trigger is still not working as expected, you can try adding a filter to the trigger to explicitly specify the file name pattern. Here is an example of how you can modify your code to add a filter:
import re @app.blob_trigger(name='myblob',
path='container-name/sub-folder-name/{name}', connection='CONNECTION_STRING')
def new_trigger(blob: func.InputStream):
if re.match(r'^my-substring-', blob.name):
logging.info(f'Processing blob: {blob.name}') process_blob(blob)
In this example, we are using the re
module to match the file name pattern explicitly. The re.match()
function checks if the file name starts with my-substring-
and returns a match object if it does.
If there is a match, the trigger will process the blob. I hope this helps in your journey.