【发布时间】:2010-08-25 15:24:59
【问题描述】:
我有一个基于 Web 的应用程序,它通过与肥皂服务器交互来将内容服务器提供给经过身份验证的用户。肥皂服务器具有用户需要能够下载的文件。
向用户提供这些文件的最佳方式是什么?当用户请求一个文件时,我的服务器将对soap服务器进行soap调用以提取文件,然后它将通过引用它的链接将其提供给用户。
问题是这些临时文件需要在某个时候清理,我的第一个想法是这是一个基于 linux 的系统,将它们存储在 /tmp/ 并让系统负责清理。
Is it possible to store these files in /tmp and have apache serve them
to the user?
如果 apache 无法访问 /tmp,因为它位于 web 根目录之外,我是否可以在 web 根目录中创建指向 /tmp/filename 的符号链接? (这需要在某些时候清理符号链接。)
关于管理这些临时文件的最佳方法的建议/cmets 是否受到赞赏?
I am aware that I could write a script and have it executed as a cron job on
regular intervals but was wondering if there was a way similar to presented
above to do this and not have to handle deleting the files?
【问题讨论】: