Hi INFO,
I have tested your code from my end and was unable to sync the trigger locally.
Error Observed:
No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
[2025-06-02T10:03:43.191Z] Host lock lease acquired by instance ID '0000000000000000000000004F4DDDC0'.
[2025-06-02T10:06:20.921Z] Worker failed to index functions
[2025-06-02T10:06:20.923Z] Result: Failure
Exception: FunctionLoadError: cannot load the BlobTriggerVideoUpload function: the following parameters are declared in Python but not in function.json: {'name'}
Solution:
Hence, I have updated your code as below and it worked:
app = func.FunctionApp()
@app.blob_trigger(arg_name="myblob", path="sourcecontainer/inputs/{name}",
connection="AzureWebJobsStorage")
def BlobTriggerVideoUpload(myblob: func.InputStream):
The name filed accessed through myblob.name
contains the path to the container and the name of the file.
To use blob name for further operations, you can split myblob.name
and extract the name of the blob and also container name as below:
Example code:
blob_name = myblob.name.split("/")[-1]
container_name = myblob.name.split("/")[0]
logging.info(f"Blob name {blob_name}")
Output:
[2025-06-02T12:02:08.601Z] Python blob trigger function processed blobName: pic-ed-source/inputs/sample.mp4Blob Size: 10 bytes
[2025-06-02T12:02:08.681Z] Printing the copied blob name sample.mp4
[2025-06-02T12:02:08.706Z] Executed 'Functions.lsayanablob_trigger' (Succeeded, Id=170f0f75-a42f-4d6e-8372-c5cfb4e31920, Duration=406ms)
- Able to deploy the function and sync the trigger after applying the above changes:
Portal:
Hope this helps!
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful, which may help members with similar questions.
If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.