Upload problems

David Richards d.richards@qut.edu.au
Thu, 11 Jan 2001 16:17:41 +1000


Additionally to my previous post about upload problems we have had more
errors reported.  We are using IMP 2.2.3 and you get an "undefined
variable" error reported in line 916 of compose.php3 when you try and
upload a file larger that the php variable 'upload_max_filesize'.

I made a very quick and dirty fix like so, in compose.php3:

if ($file_upload_size > 0) {
	$attachments_name[] = $file_upload_name;
	$attachments_size[] = $file_upload_size;
	$attachments_file[] = safe_file($file_upload) . '.att';

	if (isset ($file_upload_type)) {
		$attachments_type[] = $file_upload_type;
	} else {
		$attachments_type[] = '';
	}

	copy (safe_file($file_upload), safe_file($file_upload) . '.att');
	$msg = $message;
} else {

	# By DJR to say attachment was too large.
	$ACTION_TEXT = $lang->action_add_attach_fail;
	$get_sig = false;
	break;
}

Thanks,

-- 
David Richards
Project Manager (Messaging)
Information Technology Services
Queensland University of Technology