I have a BlobTrigger Azure Function which works with SFTP Connection via Webhook Event in Container.
So my problem is when I upload files with SFTP Connection it fires my Azure Function twice. (via SFTP Clients(WinSCP, FileZilla etc.) or even with Windows Powershell directly it fires 2 times with two different IDs. )
But when I upload(without SFTP) directly to Storage Account\Container it fires only once as it must be.
How function monitor looks like when I upload my file via SFTP
Logs
Tried to handle this with changing extension values in host.json such as maxConcurrent maxProcessor (1 most of the time..) none of it worked unfortunately. I've checked but there is only one slot, Sessions is not allowed etc.
My webhook event in Storage Account\Container
I found the issue and hopefully it can help someone else in the future;
When we upload a blob directly from the Azure portal, it would only create a single "PutBlob" event, when you use sftp protocol (no matter what software it is), it would create 2 events (sftpcreate and sftpcommit) right after the sftpconnect event. Azure Blob Storage as Event Grid source - Azure Event Grid | Microsoft Learn.