简体   繁体   English

C#:我们的应用程序:将生成的PDF文件存储在哪里?

[英]C# : We application : Where to store generated PDF files?

I am developing web application (Hosted on azure cloud service) which is generating PDF. 我正在开发生成PDF的Web应用程序(托管在Azure云服务上) Those PDFs, have to be store at some place because it will get downloaded later. 这些PDF必须存储在某个地方,因为稍后会下载。 So where to store those files ? 那么在哪里存储这些文件呢?

Right now storing it in 'Content' folder of project but issue is when I publish site again 'Content' folder gets empty. 现在将其存储在项目的“内容”文件夹中,但问题是当我再次发布站点时,“内容”文件夹变空。

So, having issue with storing files. 因此,存储文件时遇到问题。 What is the best way to store it ? 最好的存储方式是什么? To store it in DB or anywhere in cloud services. 将其存储在数据库或云服务中的任何位置。 Can not use azure storage, client don't want to use it. 无法使用Azure存储,客户端不希望使用它。

Please help me with issue. 请帮我解决问题。

Using storage is best practice, and it has a lower cost per GB than most other options in Azure. 最佳实践是使用存储,并且与Azure中的其他大多数其他选项相比,它的每GB成本更低。 If the costs at scale are a problem, there are options to move files from hot to cool storage to reduce the per GB cost as data builds up. 如果成规模的成本是一个问题,则可以选择将文件从存储移动到冷存储,以降低数据建立时的每GB成本。

You do need to store them in some sort of persistent storage, which Cloud Services does not offer. 您确实需要将它们存储在Cloud Services不提供的某种持久性存储中。 A database would work, as would deploying the application to a regular VM rather than Cloud Services. 数据库可以正常工作,就像将应用程序部署到常规VM而不是Cloud Services一样。 App Services has persistent storage, as the files are stored in Azure Storage and not on the VM, if that is an option. App Services具有永久性存储,因为可以将文件存储在Azure存储中,而不存储在VM中。 There are plenty of other options, and any sort of file share will work. 还有很多其他选项,任何类型的文件共享都可以使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM