ASP.NET Schedule deletion of temporary files

前端 未结 8 1245
暗喜
暗喜 2021-01-06 00:38

Question: I have an ASP.NET application which creates temporary PDF files (for the user to download). Now, many users over many days can create many PDFs, which take much di

8条回答
  •  猫巷女王i
    2021-01-06 01:11

    How do you store the files? If possible, you could just go with a simple solution, where all files are stored in a folder named after the current date and time.
    Then create a simple page or httphandler that will delete old folders. You could call this page at intervals using a Windows schedule or other cron job.

提交回复
热议问题