azure - 如何使用我们添加到 Azure 函数中的 HTML 中的图像?
问题描述
我正在使用 Azure Functions 生成 pdf,我正在生成 pdf 但我无法获取 pdf 上的图像?谁能告诉我如何在我已添加到 index.js 所在文件夹中的 pdf 中添加图像。
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);
解决方案
我最好将图像放入 blob 存储中,然后在 azure 函数中请求它们
[Blob("path/to/image", FileAccess.Read, Connection = "Connection")] Stream image
PS> 在 c# 中,您可以添加属性以从 blob 存储中读取文件。不确定如何在节点中执行,但请看这里
推荐阅读
- python - 如何保存标题信息,但删除顶行以迭代(Pandas Dataframe)?
- shell - 不能使用从源文件路径中的 $0 中提取的变量
- oracle - 使用 PowerShell 连接 Oracle 11g
- postgresql - 如何在 PostgreSQL 中更改一周的开始时间
- java - 选择不同的 Spinner 项目时应用程序崩溃
- javascript - 如何返回列表中同一对象的计数?
- amazon-redshift - Redshift - Split_Part 和最小值
- python-3.x - 尝试从脚本运行scrapy时出现“ImportError”
- c - C:通过绝对值函数传递数组
- firebase - SwiftUI + Firestore - 限制查询中的结果数量