During file uploads with mime/multipart, we've noticed that if a user aborts an upload, the temp files hang around. Here's a patch to modules/tcl/form.tcl that fixes this problem by unlinking the temp files immediately after they are created. This works on Unix, but may not be portable on other platforms.
IMO, there is still an outstanding problem where ns_getform returns Error: Success, but I've never figured that one out. Probably EAGAIN happening or something... Jim $ diff -c1 form.tcl newform.tcl *** form.tcl Sat Nov 23 19:02:26 2002 --- newform.tcl Sat Nov 23 19:11:38 2002 *************** *** 119,120 **** --- 119,121 ---- } + ns_unlink $tmpfile ns_conncptofp $fp *************** *** 123,125 **** close $fp - ns_unlink $tmpfile } --- 124,125 ---- *************** *** 201,202 **** --- 201,203 ---- } + ns_unlink -nocomplain $tmpfile *************** *** 206,209 **** } - - ns_atclose "ns_unlink -nocomplain $tmpfile"