开发者

Remove temporary files web application

开发者 https://www.devze.com 2023-03-05 18:00 出处:网络
I\'m developing a Web application, and there is a page when user must submit files which are saved into temporary folder on the server. If everything goes well, I send ajax request to the server to re

I'm developing a Web application, and there is a page when user must submit files which are saved into temporary folder on the server. If everything goes well, I send ajax request to the server to remove users uploaded file. But, if user closes the browser or shutdown the computer, I can't detect that.

In this case, what is the best way to gurantee that unused files are not stored forever? The site is developed in ASP.NET MVC and will be hosted on II7. Does IIS7 provides some configuration to deal with temporary files? Or I need to implement some service, which will be executed in a background with low priority and periodically ch开发者_Go百科eck if there are "old" files to be removed?

Any help is very much appreciated.


I would have a windows service in the background to delete old files at some interval.

0

精彩评论

暂无评论...
验证码 换一张
取 消