
我正在使用Azure函数生成pdf,我正在生成pdf,但我无法在pdf上获得图像?谁能告诉我如何添加图像内的pdf,我已经添加在文件夹中放置index.js的图片。
if (Code === '1416') {
account.img = `\EmpPDF\\16.png`;
} else if (Code === '1411') {
account.img = `\EmpPDF\\11.png`;
} else {
account.img = `\EmpPDF\\1.png`;
}
const imgPath = Path.join(__dirname, account.img);
context.log("img Path : ", account.img);发布于 2019-11-15 20:12:33
我最好将图像放入blob存储中,然后在azure函数中请求它们。
[Blob("path/to/image", FileAccess.Read, Connection = "Connection")] Stream imagePS>在c#中,您可以添加属性以从blob存储中读取文件。不确定如何在节点but look here中进行操作
发布于 2020-12-16 13:02:22
把你所有的图片放在/Images文件夹里,你就可以用Context对象来阅读了
public static async Task<IActionResult> Run(HttpRequest req, ILogger log,ExecutionContext context){
log.LogInformation("C# HTTP trigger function processed a request.");
string templateFile = Path.Combine(context.FunctionAppDirectory, "Images", "azure.Jpeg");https://stackoverflow.com/questions/58874234
复制相似问题