Reputation: 580
I know you can use the local file system in azure functions in D:\local\Temp.
Is it possible for two azure functions to share a directory in a file system?
I would like to download a file in one azure function, and read/write it in another, and upload it in yet another azure function.
Is this possible? Or do I have to do all these 3 steps in one azure function?
Upvotes: 1
Views: 1556
Reputation: 35134
Sharing a local folder is not a recommended way to communicate between two functions. In case you are running on consumption plan, your functions might be running on two different instances (server), and thus they will lose this communication channel.
Use something like Blob Storage instead of local folders.
Upvotes: 3
Reputation: 24549
If your 2 Azure functions are in one functions app, we could use the shared path
D:\home
. The path D:\local\Temp
your mentioned is a temporary folder, if the App restarted then files will lost in the folder.
Note: If we use the Azure functions' shared path, we need to notice the limitation size of the shared folder, it depends on your service plan price tier.
If you are using the 2 Azure function Apps, we could use the Azure blob storage.
Is this possible? Or do I have to do all these 3 steps in one azure function?
Yes, you also could do that in the one azure function.
Upvotes: 1