Upload Feature Error

15 posts by 7 authors in: Forums > CMS Builder
Last Post: October 22, 2012   (RSS)

By Jason - October 4, 2012

Hi Djulia,

We've investigated this issue further and found that this is part of a PHP bug, where some .swf files are seen to have a file type of .swc:

https://bugs.php.net/bug.php?id=51700

Here is a work around that will be put into the next release:


*NOTE: ALWAYS make a backup of your files before changing CMS Builder source code*

- Open cmsAdmin/lib/upload_functions.php
- In the saveUpload function (around line 207 in version 2.17), you'll see this line of code:

if ($fileExt == 'swf' && $imageType != IMAGETYPE_SWF) { $isValidFileType = false; }

- replace this line with this:

if (in_array($fileExt, array('swf','swc')) &&
!in_array($imageType, array(IMAGETYPE_SWF, IMAGETYPE_SWC))) { $isValidFileType = false; }


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Upload Feature Error

By Djulia - October 5, 2012

Hi Jason

The file is [font "Verdana"]upload[/#000000]ed, but I always have PHP Notice.

Undefined index: channels in upload_functions.php on line 201

An idea?

Thanks again!

Djulia

Re: [greg] Upload Feature Error

By Djulia - October 5, 2012

Hi Greg,

It is perfect! Thanks! :)

Djulia

Re: [greg] Upload Feature Error

By InHouse - October 22, 2012

Just a note, but we saw the same issue but not with a. SWF file. It was with a PNG that I think was saved in the CMYK colour-space.
This fix removed the error message and allowed us to save the record.
Thanks to Greg and Jason for this.
J.