gpt4 book ai didi

java - Azure Functions 和临时文件存储

转载 作者:行者123 更新时间:2023-12-04 01:15:32 24 4
gpt4 key购买 nike

我是初学者,之前从未处理过基于云的解决方案,所以对于这个愚蠢的问题深表歉意。

我有一个包含 PDF 文件的 Azure Blob 存储,我想使用 PDFBox 从中提取数据。因为PDFbox不能直接加载blob,所以我目前先在本地下载这些文件。但是,最终我的项目将需要完全基于云,最好是作为 Azure Functions。

因此,主要障碍是弄清楚我的 Azure Functions 应该如何访问这些文件。在我的 Azure Functions 中使用控制台时,我注意到它带有一个文件存储。函数可以在处理之前下载 blob 并将它们存储在这里吗?此文件存储的工作方式与本地环境相同还是需要牢记差异?

我只想在这里临时存储文件,一次只存储几分钟。

最佳答案

The main hurdle therefore is figuring out how my Azure Function shouldaccess the files. When using the console inside my Azure Function Inoticed it comes with a file storage.

是的,你部署的 azure 函数的所有信息都存储在你设置的文件存储中。(它是在你创建函数应用程序时定义的。)

Can the Function download blobs and store them here before processingit? Does this file storage work the same as a local environment or arethere differences to keep in mind?

是的,你可以。根目录是 D:/home/site/wwwroot。所以如果你不指定,你创建的文件将在这个目录中。

记得删除文件,因为存储空间有限。它基于您选择的计划。

I'm only looking to store files temporarily here, for only a fewminutes at a time.

顺便说一下,如果你从blob存储中获取一个文件,此时你已经完全获取了它的数据。您可以直接在代码中处理获取的数据,而无需将其暂时存储在当前文件夹中。 (当然,如果你有特殊需求,请忽略这一项。)

关于java - Azure Functions 和临时文件存储,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63474528/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com