ASP.NET Schedule deletion of temporary files

前端 未结 8 1184
暗喜
暗喜 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条回答
  •  Happy的楠姐
    2021-01-06 01:35

    Create a timer on Appication_Start and schedule the timer to call a method on every 1 hours and flush the files older than 8 hours or 1 day or whatever duration you need.

提交回复
热议问题