API page: http://api.drupal.org/api/drupal/modules%21file%21file.module/function/f...
Enter a descriptive title (above) relating to file_ajax_upload, then describe the problem you have found:
In the following validation:
if (empty($_POST['form_build_id']) || $form_build_id != $_POST['form_build_id']) {
// Invalid request.
drupal_set_message(t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', array('@size' => format_size(file_upload_max_size()))), 'error');
$commands = array();
$commands[] = ajax_command_replace(NULL, theme('status_messages'));
return array('#type' => 'ajax', '#commands' => $commands);
}
The error message has absolutly nothing related to the actual error, this greatly mislead a member of our team while debugging one of our feature. I understand the "security implications" of giving an explanation of whats going on to the user but maybe the error message could be something like "An error occured while authorizing the upload of your file." Or something more vague...