阅读背景:

如何删除CGI显示的临时文件(图像)?

来源:互联网 

I've written a python CGI script that converts files into .jpgs and displays them in a simple HTML page. I don't want to clutter up the folders with these .jpg files, so I used tempfile.NamedTemporaryFile to create a file to store the converted .jpg output. Everything works great, but i want to remove this file after the page is displayed. Currently I have delete=False set, but i can't seem to remove the file without causing a broken img link.I've written a python CGI script that converts




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: