functions-headless-chromium | Using headless Chromium in Azure Functions | Azure library
kandi X-RAY | functions-headless-chromium Summary
kandi X-RAY | functions-headless-chromium Summary
Using headless Chromium in Azure Functions
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of functions-headless-chromium
functions-headless-chromium Key Features
functions-headless-chromium Examples and Code Snippets
Community Discussions
Trending Discussions on functions-headless-chromium
QUESTION
I am using Microsoft Playwright in order to create a PDF from a remote website inside an Azure Function (HTTP trigger). The method used is page.GetPdfAsync() that only handles a file path in order to create the generated PDF file. I would like to store the file in an Azure Blob storage container but as the GetPdfAsync() method doesn't handle stream or Azure blob storage, I am trying to temporary store the generated file. I tried to use different local folders such as /tmp or /local but each time I trigger the function I see an exception in the trace saying that the filesystem is read-only.
I read this blog post from Anthony Chu so it seems that Playwright is now supported on a Linux consumption plan but in the article the generated screenshot is directly sent back in the HTTP response and never not stored on the local disk.
For the coding environment, I am using C#, VS 2019 and Azure Function Core Tools + Azure CLI for the deployment.
Any idea how I can handle this scenario?
...ANSWER
Answered 2020-Sep-30 at 17:39Page.GetPdfAsync()
returns a byte[]
. You can pass null to the path and upload the resulting byte[]
to Azure.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install functions-headless-chromium
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page