--- upload.module Mon Jan 15 11:22:34 2007 +++ upload.module Tue Feb 27 10:46:59 2007 @@ -444,18 +444,22 @@ function _upload_validate(&$node) { $valid = TRUE; if ($error['extension'] == $user_roles) { form_set_error('upload', t('The selected file %name can not be attached to this post, because it is only possible to attach files with the following extensions: %files-allowed.', array('%name' => $file->filename, '%files-allowed' => $extensions))); + watchdog('upload', t('Upload failed: not a permitted file extension.'), WATCHDOG_NOTICE); $valid = FALSE; } elseif ($error['uploadsize'] == $user_roles) { form_set_error('upload', t('The selected file %name can not be attached to this post, because it exceeded the maximum filesize of %maxsize.', array('%name' => $file->filename, '%maxsize' => format_size($uploadsize)))); + watchdog('upload', t('Upload failed: exceeded maximum filesize.'), WATCHDOG_NOTICE); $valid = FALSE; } elseif ($error['usersize'] == $user_roles) { form_set_error('upload', t('The selected file %name can not be attached to this post, because the disk quota of %quota has been reached.', array('%name' => $file->filename, '%quota' => format_size($usersize)))); + watchdog('upload', t('Upload failed - disk quota has been reached.'), WATCHDOG_NOTICE); $valid = FALSE; } elseif (strlen($file->filename) > 255) { form_set_error('upload', t('The selected file %name can not be attached to this post, because the filename is too long.', array('%name' => $file->filename))); + watchdog('upload', t('Upload failed - filename too long.'), WATCHDOG_NOTICE); $valid = FALSE; }