PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

File Upload not working - FAILED (Temporary file could not be copied.) Help!!

  1. Hey Guys, I am getting an error on file uploading. In my uploads directory i DO have the "gravity_forms" folder, it is also writing the directories for the form submission date so i think at least that part is working. the form goes through and validates fine appearing as though all went well but i am getting no file in the directory and this message in my notification email:

    FAILED (Temporary file could not be copied.)

    Any ideas?

    I tried using perm set at 775 and 777 on ALL directories under gravity_forms, including that parent directory itself.

    Posted 15 years ago on Wednesday October 21, 2009 | Permalink
  2. How big is the file you are trying to upload when testing?

    Posted 15 years ago on Wednesday October 21, 2009 | Permalink
  3. The function failing here is a native php function (move_uploaded_file). It tries to move files uploaded via HTTP POST to the specified folder. According to the PHP docs, it could fail if the file was not uploaded correctly or if it can't be copied to the destination folder for some reason.

    Is there any change you can give us a temporary FTP and WP account so we could troubleshoot it? We can't replicate this issue on our servers.

    You can email me at alex[at]rocketgenius.com.

    Posted 15 years ago on Wednesday October 21, 2009 | Permalink
  4. carl - you made me realize... i forgot wordpress has that 2mb upload limit. i just had to increase my php.ini upload file and memory limts. this can also be done with .htaccess.

    if anyone else is having issues, you might look into that, if your file upload is over 2mb - it may be failing, check out your php.ini and .htaccess files, and search on google for"wordpress upload limits"

    thanks for kicking my brain into gear carl, it all works fine now.
    cheers.

    Posted 15 years ago on Wednesday October 21, 2009 | Permalink
  5. WyattK
    Member

    Does anyone have a clearer explanation on how to fix this issue? We are having the same problem and to no avail. Do we need to change permissions on a particular folder? Should we edit the php.ini file. And if so, what should we write?

    Thanks. Looking forward to working this last bug out and letting gravity do the rest.

    :-)

    W

    Posted 13 years ago on Tuesday June 28, 2011 | Permalink
  6. You need to update your php.ini file on your server to increase the upload limit file size.

    Posted 13 years ago on Tuesday June 28, 2011 | Permalink
  7. Hey, Carl.

    I am using WP Engine and they bumped my Max Upload limit to 100MB for me and said it's the plugin that is popping up with the issues for anything over 50MB, which was the original limit for the host.

    So, Jason Cosper with WP Engine support suggested a ticket here to work with them, knowing it's not a php.ini limit or a permissions issue (since it will upload 47MB files but not a 61.5MB file) and those are the two things I keep seeing as possible solutions on the forums.

    I installed the code here to indicate that the upload failed (and thus stopping the submission) and that code is working: http://coenjacobs.me/2011/06/15/file-upload-size-tweaks-gravity-forms/

    The form is here http://betterhome.wpengine.com/upload-photos/ but requires a simple login to upload. You've got my contact info - I'll send you a login to upload or an admin login if you don't want to create a dummy login.

    Posted 12 years ago on Thursday August 30, 2012 | Permalink
  8. Bump. This is site-critical.

    Posted 12 years ago on Wednesday September 5, 2012 | Permalink
  9. David Peralty

    Can you have Jason check the server/php logs on failed file uploads to see if any messages are being written. Gravity Forms doesn't really track or limit file uploads, as you've sort of noted through the link on the code sample at coenjacobs site.

    Do you have any other plugins that might be limiting file uploads or timing out PHP during file processing?

    Posted 12 years ago on Wednesday September 5, 2012 | Permalink
  10. I trust WP Engine but I am wondering if max_execution_time is coming into play. It might not be the file size, but the length of time it takes the script to process the upload.

    Related: http://www.gravityhelp.com/forums/topic/uploading-issues-with-multiple-fles

    Can you get that setting from the php.ini or php info()?

    Posted 12 years ago on Wednesday September 5, 2012 | Permalink
  11. I'm asking them now. My ticket with him is still open so I expect a quick response will be forthwith.

    Posted 12 years ago on Wednesday September 5, 2012 | Permalink