Forum .LRN Q&A: Re: File upload

6: Re: File upload (response to 1)
Posted by Jamie Rasmussen on
I don't know if this is still the problem, but in the past file uploads were broken on Windows because ad_page_contract_filter_proc_tmpfile in packages\acs-tcl\tcl\tcl-documentation-procs.tcl and check_for_form_variable_naughtiness in packages\acs-tcl\tcl\utilities-procs.tcl fall back on "/var/tmp" and "/tmp". You could change these procs to include something like this:
set tmpdir_list [ad_parameter_all_values_as_list TmpDir]
if { [empty_string_p $tmpdir_list] } {
	global tcl_platform
	if {$tcl_platform(platform) == "windows"} {
		set tmpdir_list [list [file dirname [ns_tmpnam]]]
	} else {
		set tmpdir_list [list "/var/tmp" "/tmp"]