Azure trigger function for file share - azure

Like we have blob trigger or event trigger for the blob created or deleted in Azure blob storage, I need to have a function which is triggered when a file is uploaded or created in file share.
Blob storage trigger, event grid trigger doesn't work on Azure file share. Can you please suggest on any custom trigger function or any other way to use the trigger functions on file share?

I am making use of timertrigger to check if the files are created in fileshare. So basically, considering the time difference between 2 timer trigger run, I am checking the new files created and performing further operations.

No, your requirement is not possiable.
Azure function don't support file share as the condition of the trigger, you can have a look of this:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings?tabs=csharp#supported-bindings
Can you please suggest on any custom trigger function or any other way
to use the trigger functions on file share?
As far as I know, it seems didn't have a service to do this. You can do something like this: After you send the data to the file share, hit other api or hit the something like httptrigger to do something.

Related

Email notification about new files on Azure File share

What are possible ways to implement such scenario?
I can think of some Azure function which will periodically check the share for new files. Are there any other possibilities.
I have been thinking also about duplicating the files to Blob storage and generate the notifications from there.
Storage content trigger is by default available for blobs. If you look for migrating to blob storage, then you can utilise BlobTrigger Azure function. In case of file trigger in File Share, the below are my suggestions as requested:
A TimerTrigger Azure function that acts as a poll to check for new file in that time frame the previous trigger occured.
Recurrence trigger in logic app to poll and check for new contents.
A continuous WebJob to continuously poll the File Share checking for new contents.
In my opinion, duplicating the files to Blob storage and making your notification work may not be a great option, because such operation once again requires a polling mechanism which can be achieved with options like a few mentioned above, but is still unnecessary.

Sending excel file from a Blob Storage to a REST Endpoint in Azure Functions with Node

Working on a small personal project where I can drop an .xlsx file on Azure Blob and it'll trigger( Node.js Blob Storage Trigger fn ) and send to a REST endpoint to be parsed and worked with etc.
I've been able to set it up and have the file be moved to another blob( intend to set up logic on the HTTP response to REST endpoint to then archive said file);
I'm not exactly sure how to set up the correct code and bindings to take the ingested .xlsx file and send the whole thing to an endpoint.
Bonus Question: is it better practice to zip the file or convert to binary or anything before sending? Performance isn't too big of a concern currently.
Thanks for any information or any pointers.
The recommended approach is to use event grid trigger of blob storage to trigger an event grid trigger based Azure function. Please refer these which seems to meet your requirement
Blob Event and Event Grid Trigger For Azure Function.
Note: Using blob trigger of Azure function may not be as reliable as Event Grid trigger for high volume scenario.
To answer to your bonus question, I think it won't be much beneficial to zip your .xlsx files since those are already compressed behind the scene.

Azure use logic app to load files from file storage to blob storage

I need to use logic app to load some csv files in a files storage in Azure to a blob storage. what trigger to use in logic app to access the files storage in Azure? I have tried e.g. file systems but that seems works for windows file share. What i want to do is to check if there is a new file in the file storage then load it to the blob. I know there are other ways to achieve this but I am assigned the task of looking into the feasibility of doing this using logic app.
For now, since file storage connector now has no trigger like when a file is added or modified so you could not achieve your function. So maybe you could go to feedback and ask for Logic App help .
And now, you could only copy specified file to blob with Get file content using path and Create blob. Or you choose use Azure Function with timer trigger to move new file to blob.
If you still have other questions, please let me know.

Is there any way to know when new file gets in azure file storage

I am trying to download and perform some action whenever there is new file in file storage.
but there is absolutely no way to do it.
I tried mapping the drive on to a vm and use Inotifywait tool (failed to get notifications).
I tried logic app and sftp to file share was not able to connect it.
I checking all over internet but found nothing
can anyone suggest any alternative ?
Thanks
I am trying to download and perform some action whenever there is new file in file storage.
As far as I know, it is not supported Azure storage file trigger now. I also find the related azure feedback.
can anyone suggest any alternative?
Based on my experience, if azure blob storage is possible, you could use blob trigger to replace it. Or you could use WebJob time trigger to check whether there is any update on the storage file share.

How to make code on an Azure VM trigger from storage blob change (like Functions do)

I've got some image processing code that I need to run in Azure. It's perfect for an Azure Function, but unfortunately requires a component with a complex installation procedure and therefore will need to run in a VM.
However, I'd like to make it behave much like an Azure Function, and trigger whenever new items arrive in blob storage.
My question is: Does Azure provide me with any handy way of doing this, or do I have to write code that polls the blob storage looking for new items?
Have a look at Azure WebJobs SDK. It shares API model with Functions, but you can host it in any .NET application. Blob Trigger.

Resources