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

New Extension: nGen File Field for FieldFrame

Development and Programming

hothousegraphix's avatar
hothousegraphix
851 posts
15 years ago
hothousegraphix's avatar hothousegraphix
PHP Upload is set to 32Mb and I had my host temporarily set memory from 32Mb to 128 for testing purposes - anything else you guys can think of?

How about “post_max_size”? I’m not sure but I think the default is set to 8M which would account for why you’re unable to upload files larger than 10M.

       
Steven Grant's avatar
Steven Grant
894 posts
15 years ago
Steven Grant's avatar Steven Grant

got it sorted with my host www.geeksrv.net (hope that doesn’t break rules? but I can’t speak highly enough of them).

Upped the limit for POST to 12mb as that was set at 8mb - although file upload is set higher the $_POST variable was only allowed to upload 8mb.

       
smit's avatar
smit
7 posts
15 years ago
smit's avatar smit

Thanks for this awesome extension!

However I ran into problems on a site that features several very large video files (up to 800 mb). When trying to add or edit an entry the page was loading forever. I figured it had something to do with the size of the files since the issue only came up in one weblog.

The problem is the method which checks if a file is an image or not. To do so it runs exif_imagetype() on a file which doesn’t play nice with very large (video) files. The server was completely overstrained.

I added a simple file extension check to ensure that exif_imagetype() will only be executed on files which seem to be image files which solved the issue.

//
    // Checks if a file is an image
    //
    function _is_image($file) {
        $is_image = false;
        $file = trim($file);
        
        // Check for extension first to avoid running exif_imagetype()
        // on (possibly large) non-image files.
        if(preg_match('/^.+\.(gif|jpg|jpeg|png|bmp)$/i', $file) === 1) {
            switch( exif_imagetype($file) ) {
                case IMAGETYPE_GIF:
                case IMAGETYPE_BMP:
                case IMAGETYPE_JPEG:
                case IMAGETYPE_PNG:
                    $is_image = true;
                    break;
            }
        }
        
        return $is_image;
    }
    //

You may want to include this in the next version of the fieldtype. Keep up the great work! 😊

       
Sanity11's avatar
Sanity11
228 posts
15 years ago
Sanity11's avatar Sanity11

I found the field doesn’t give the error when I don’t enter a title…? I receive a warning and the pic is uploaded…? After adding a title the same bug is present. The post is added to the database without the picture. Someone…?

       
John Macpherson's avatar
John Macpherson
113 posts
15 years ago
John Macpherson's avatar John Macpherson

This is a really excellent extension and i cant thank you enough.

However, when using with saef, i noticed that it uses the css file within the admin area. Basically it reveals the renamed ‘system’ folder path. This is could be a security violation?

Apologies if they has been mentioned previously but i thought id bring it up.

       
Todd D.'s avatar
Todd D.
460 posts
15 years ago
Todd D.'s avatar Todd D.
Thanks for this awesome extension! However I ran into problems on a site that features several very large video files (up to 800 mb). When trying to add or edit an entry the page was loading forever. I figured it had something to do with the size of the files since the issue only came up in one weblog. The problem is the method which checks if a file is an image or not. To do so it runs exif_imagetype() on a file which doesn’t play nice with very large (video) files. The server was completely overstrained. I added a simple file extension check to ensure that exif_imagetype() will only be executed on files which seem to be image files which solved the issue.
//
    // Checks if a file is an image
    //
    function _is_image($file) {
        $is_image = false;
        $file = trim($file);
        
        // Check for extension first to avoid running exif_imagetype()
        // on (possibly large) non-image files.
        if(preg_match('/^.+\.(gif|jpg|jpeg|png|bmp)$/i', $file) === 1) {
            switch( exif_imagetype($file) ) {
                case IMAGETYPE_GIF:
                case IMAGETYPE_BMP:
                case IMAGETYPE_JPEG:
                case IMAGETYPE_PNG:
                    $is_image = true;
                    break;
            }
        }
        
        return $is_image;
    }
    //
You may want to include this in the next version of the fieldtype. Keep up the great work! 😊

Nice addition. Thanks!

       
mmjaeger's avatar
mmjaeger
78 posts
15 years ago
mmjaeger's avatar mmjaeger

Hello I’m just trying to set up nGen Field and FieldFrame, when I try to add a new field and set it to FF Matrix, I’m supposed to get a matrix - I’m not getting anything.

Firebug shows me the following errors: nGenFile is not defined [Break on this error] [removed]\nindex.ph…roup_id=1 (line 2543) jQuery.fn.ffMatrixConf is undefined [Break on this error] jQuery(window).bind(“load”, function() {\n

Am I missing anything or is there something wrong with the extensions?

Thank you in advance for your help.

       
kscot's avatar
kscot
91 posts
15 years ago
kscot's avatar kscot

mmjaeger - Do you have the most recent version of jquery for the Control Panel installed and enabled? (Should be 1.1.2) If not, you can download here:

http://www.ngenworks.com/software/ee/cp_jquery/

       
Neil Evans's avatar
Neil Evans
1,374 posts
15 years ago
Neil Evans's avatar Neil Evans

can i ask if anyone knows… should this extension resize images when the upload preferences have a set maximum size. for example my upload preference sets a folder, and max width of 900px. therefore if i upload a larger image should this be resized down to 900? i am comparing to mark huots file - which i know used to do this - but had plenty of other bugs and i prefer this!

       
Sanity11's avatar
Sanity11
228 posts
15 years ago
Sanity11's avatar Sanity11

Found the problem, I was testing ExtendedGallery for this particular functionality. Once deinstalled and the extension turned off it works fine 😊.

       
kscot's avatar
kscot
91 posts
15 years ago
kscot's avatar kscot

nevsie, this extension does not resize uploads to the size specified in the file uploads preferences. I use the Image Sizer plugin to resize my images on the fly:

http://www.lumis.com/page/imgsizer/

       
Neil Evans's avatar
Neil Evans
1,374 posts
15 years ago
Neil Evans's avatar Neil Evans

Hey, Thanks for the update, and yes i too am using Lumis imgsizer. I don’t know why, probably mixing this up with Mark Huots file - i thought this did resize images. I guess when it said in the docs that it used preferences i assumed! Thanks for the reply, no worries i can code around this anyway. N

       
Fred Boyle's avatar
Fred Boyle
73 posts
15 years ago
Fred Boyle's avatar Fred Boyle

If you’ve had an issue with File field recently please PM me so I may work with you one on one. It seems the thread has not been notifying me of updates.

When sending me information about your issue please be as descriptive as possible, include login/url for CP access, and FTP access if possible. This will help me just get in there to research and help resolve your issue.

Thanks for your understanding and for using the File Field!

       
shinka's avatar
shinka
138 posts
15 years ago
shinka's avatar shinka

Fred took a look at my site and managed to fix the memory I was having by manually increasing the memory allocated to PHP. Since the new version was creating thumbnails on the fly, it needed more RAM than the 64MB already available (I’ve got some huge images in my current site).

       
leemcalilly's avatar
leemcalilly
97 posts
15 years ago
leemcalilly's avatar leemcalilly

I’m having the same issue for uploading large video files as described by smit and Todd D. I tried the code they reference. Here’s what I’m using:

// Checks if a file is an image
    //
    function _is_image($file) {
        $is_image = false;
        
        // legacy for MH File compatibility
        $file = trim($file);
            
     // Check for extension first to avoid running exif_imagetype()
            // on (possibly large) non-image files.
            if(preg_match('/^.+\.(gif|jpg|jpeg|png|bmp)$/i', $file) === 1) {
                switch( exif_imagetype($file) ) {
                    case IMAGETYPE_GIF:
                    case IMAGETYPE_BMP:
                    case IMAGETYPE_JPEG:
                    case IMAGETYPE_PNG:
                        $is_image = true;
                        break;
                }
            }
        
        return $is_image;
    }
    //

That should be same as smit posted above. It’s still not working. I’m still getting a white screen in the CP. (see the attached screenshot).

Any thoughts on what the issue could be?

       
First 28 29 30 31 32 Last

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.