'How to Add Static Files and Folders to Azure Function Deployment in Azure
I using an Azure function app to call the API from Asp.Net core application, in azure functions I am handling statics folders and files. After deployed in Azure there is no folders and files in app service editor screen.
How can I include the files and folders at the time of deployment? Is there any possibilities to add wwwroot folder like we are having in Asp.Net core application?
Solution 1:[1]
If you develop your Function App localy it will deploy to Azure portal only files from your local /bin folder and host.json. So, you won't have an ability to edit your code from the portal.
If you're starting your Function App from scratch on the portal, you can add folders and files to your App in such a way:
Azure Function app -> Development Tools section -> Advanced Tools, then click on theGobutton on the Advanced Tools window. Now you are able to seeDebug consoleDropDown on the top of the page, select theCMDoption from that dropdown. Click on theSitefolder.There are two ways of adding files/folders: 1. by clicking+near the folder name 2. using powershell window that you have below (run something likemd [folderName]).Azure Function app -> Development Tools section -> App Service Editor (Preview), then use context menu (by clicking right mouse button) to add files/folders in a folder tree of your App.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
