Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 

4 posts by 3 authors in: Forums > CMS Builder
Last Post: June 20, 2017

By Jeffncou - June 16, 2017 - edited: June 16, 2017

I have an problem when uploading files. The error is: 

Notice: Undefined variable: encodedFilename in /*/*/*/*/cmsAdmin/lib/upload_functions.php on line 180

The error seems to occur when the file size is too big. A 2.9MB file failed to upload. I reduced the file size and it uploaded successfully.

I have set the maximum upload size to 10240kb in the section editor – so I should have been fine with 2.9MB. Is there another area that the file size needs to be changed?

Thanks

Hi Jeff, 

Looks like that's a bug with some rarely seen error checking code.

In /lib/upload_functions.php can you try searching for "not chunked" and replace this: 

  // ...not chunked?
  else {
    
    if (!$skipUploadSecurityCheck && !is_uploaded_file($uploadInfo['tmp_name'])) {
      return "Error saving '$encodedFilename', file wasn't uploaded properly.<br/>\n";
    }

With this:

  // ...not chunked?
  else {
    
    if (!$skipUploadSecurityCheck && !is_uploaded_file($uploadInfo['tmp_name'])) {
      return "Error saving '" .htmlencode($uploadInfo['name']). "', file wasn't uploaded properly.<br/>\n";
    }

We'll get this fixed for the next release.  Thanks for the report!

Dave Edis - Senior Developer
interactivetools.com

Thanks Dave

That's fixed the error message. It is now returning "Error saving 'filename.pdf', file wasn't uploaded properly." as expected.

Thanks, Jeff Shields for the info too.