I've been troubleshooting a form in Drupal 7 that has two file upload fields.

If you upload a file with one field, then the other, the second upload will usually give an error. This occurs regardless of the order that the files are uploaded. The error does not occur if the files are both added to the "Choose File" fields and the whole page is submitted at once with the save button. The error also does not occur if JavaScript is disabled in the browser, and the individual upload buttons are used.

The easiest workaround I can imagine would be to disable javascript for the form controls on the specific /node/add page, but I do not know how to do this, and I have been unable to find people with a similar need.

The server is PHP/Apache2, with mod_security disabled and with the PHP post size limit and uploaded file size limit set to high limits as per the screenshot. File uploads work normally, leading me to rule out permissions as a culprit.

The watchdog logs and server error_log have no messages of interest, unfortunately.

If anyone has any advice to disable javascript for a page, or to resolve this error, please let me know. Thanks!

first screenshot second screenshot third screenshot

  • Hey, @fabspro. I am facing same issue today.Can u please provide me your guidance.
    – parth.k
    Commented Jun 19, 2017 at 8:12
  • @parth.k I could not resolve this issue, but I worked around it by disabling ajax. And it seems Ivan has given a potential answer below. Good luck!
    – fabspro
    Commented Jul 27, 2017 at 12:31

1 Answer 1


This error is for this line in file.module 241 --if (empty($_POST['form_build_id']) || $form_build_id != $_POST['form_build_id']) {

You should revise your URL

  • From memory, to make it work I decided to disable the AJAX uploading somehow, probably with PHP in a custom module. But now if I find some time I might go back to this website and look into that and see if I can make it work the way it is supposed to.
    – fabspro
    Commented Feb 6, 2015 at 7:21
  • Can anyone please explain "You should revise your URL" ?
    – parth.k
    Commented Jun 21, 2017 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.