

To create these resources, follow this guideĪfter you created the storage account and file share, use the az webapp config storage-account add command to attach the file share to your functions app, as shown in the following example. In the account, you also need to create file share in Azure files. Consider this approach when you want to decouple dependencies or artifacts from your application code.įirst, you need to create an Azure Storage Account. Functions lets you mount a file share hosted in Azure Files. When running your function app on Linux, there's another way to bring in third-party dependencies. Return request.createResponseBuilder(HttpStatus.OK).body(out).build() īring dependencies by mounting a file share Out = stdError.lines().collect(Collectors.joining("\n")) InputStreamReader(proc.getErrorStream()))


String out = stdInput.lines().collect(Collectors.joining("\n")) īufferedReader stdError = new BufferedReader(new InputStreamReader(proc.getInputStream())) public class Function īufferedReader stdInput = new BufferedReader(new Here's an example to access and execute ffmpeg dependency that is put into /ffmpeg_lib directory. Here's an example on how to do it in Maven. Here's an example of the directory samples in a Java functions project: /įor Java specifically, you need to specifically include the artifacts into the build/target folder when copying resources. One of the simplest ways to bring in dependencies is to put the files/artifact together with the functions app code in functions project directory structure. Error message:" + str(e),status_code=200) Return func.HttpResponse("Unexpected exception happened when executing ffmpeg. Return func.HttpResponse(byte_code('UTF-8').rstrip(),status_code=200) # context.function_directory returns the current directory in which functions is executedįfmpeg_path = "/".join()īyte_output = subprocess.check_output() # If no command specified, set the command to help ('Python HTTP trigger function processed a request.') import loggingįFMPEG_RELATIVE_PATH = "./ffmpeg_lib/ffmpeg"Ĭontext: func.Context) -> func.HttpResponse: As a result, your function code can access the dependencies in the cloud via file system api. Here's an example of the directory samples in a Python functions project: /īy putting the dependencies in a folder inside functions app project directory, the dependencies folder will get deployed together with the code.

One of the simplest ways to bring in dependencies is to put the files/artifact together with the functions app code in Functions project directory structure.
