We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SOLVED: nGen File 0.9.7 in FieldFrame 1.1.2 FF Matrix: Errors thrown when uploading a .swf file

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

EE 1.6.7, Build 20090320 nGen File 0.9.7 FieldFrame 1.1.2

File upload path is fine, set to allow all file types (PDFs upload fine).

Very simple matrix set up with one dropdown and one file field. I can upload PDF files no problem, but some of my “entries” also have .swf files associated with them. When I attempt to browse for and upload a .swf, I get the following errors on a white screen (from lines 809 and 811) when I click the Update button:

Notice: Undefined variable: im in /…/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 809 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /…/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 809 Notice: Undefined variable: im in /…/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 811 Warning: imagedestroy(): supplied argument is not a valid Image resource in /…/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 811 Warning: Cannot modify header information - headers already sent by (output started at /…/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php:809) in /…/system/core/core.functions.php on line 296

Any idea what I can do so that I can get around SWFs? Seems like nGen File might think it’s an image and is trying to create a thumbnail?

I should note that I can get this to work if I go back to the previous page, click “Update” again, then click “Edit this entry” on the next screen, then go back and select the SWF from the already uploaded files (apparently is does upload) and then clicking “Update” again. Not exactly what I want to instruct my client to do.

Thanks!

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

Fred helped via IM and here the solution for nGen file 0.9.7 and SWF files.

Change line 545 from

if($is_image) {

to

if( $this->_is_image($upload_path . $file_name) ) {

Fred mentioned also that this will be fixed for the next release.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.