Hello,
In a website I manage, a content-type has one Image field (1 value possible) and one File field (unlimited values).
As anonymous user and only anonymous, if I populate the image input and then click on transfer (on Imce), no problem, the transer is done and i can see the preview of my image.
But after doing that if I populate the File input (with a 100 kb file) and click on transfer, the transfer fail with this message :
"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (20 MB) that this server supports."
I've found where the error is :
In file.module line 245 (function "file_ajax_upload()"):
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 problem is that since my first transfer (for the image), the $form_build_id
and the $_POST['form_build_id']
are no longer equal.
The drupal set massage says it is because of the size. It is not appropriate.
By the way is there a solution to avoid this problem as anonymous user ?
Thanks for your reading.