Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经在 JSF 2 上使用 tomahawk 实现了文件上传。用户必须上传和裁剪图像。当用户上传图像时,在显示之前,图像会保存在文件系统中。如果上传图片后,用户移动到另一个链接我想删除上传的文件。有没有办法知道是否未执行某些操作?
我认为数据库中有一个表,您在其中存储了有关上传文件及其路径的信息。
在服务器上制定一个计划进程,该进程定期运行并检查表中包含有关上传文件的信息以及其他数据库信息。
并从文件系统中删除带有文件的孤立文件记录。