Levertine

Levertine Gallery => Questions and Discussion => Resolved => Topic started by: Steve on January 17, 2015, 02:30:13 PM

Title: File size of 16 x 14 is too big?
Post by: Steve on January 17, 2015, 02:30:13 PM
I got this error when trying to upload a 16 x 14 gif:



Something went wrong while uploading this item:
The image you tried to upload is too big. (new.gif)

Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 17, 2015, 02:51:16 PM
As an admin or user? And what size quota did you have set for that user (assuming not an admin)? I tweaked that code in 1.1 like I mentioned elsewhere, thought I'd fixed it since it seemed to kick back images as it should for me. (I am assuming you're talking 1.1?)
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 17, 2015, 04:00:25 PM
Um, I got that error here.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 17, 2015, 04:20:28 PM
Confirmed.  I just tried a 16 x 16 gif image, and got,

"Something went wrong while uploading this item: The image you tried to upload is too big. (animated_fav.gif)"

Image attached.

Edit: Must be a setting or something on here, because I'm also running  version 1.1.0 and can upload it no problem on my own site.  ;)
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 17, 2015, 05:21:44 PM
Here was running rev 958, the changes to image upload were handled in revisions 959 to 962 (r963 fixed the version number as 1.1.0). I've just updated to r963 here, so it should behave now.

Please let me know if it still occurs here.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 17, 2015, 05:30:47 PM

Please let me know if it still occurs here.

Still getting the error here Pete.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 17, 2015, 05:35:47 PM
Huh. I wonder what's causing that then.

Time to go diving in the code since it all works as expected for both admin and normal users on a test site. I wonder if it's related to being an animated GIF since I didn't test that.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 17, 2015, 06:04:50 PM

I wonder if it's related to being an animated GIF since I didn't test that.


Could be I guess, I just grabbed one sitting in my test files without thinking about the animation.  Like I said it uploads on my Guitarist Guild without problem. 

I'm not sure if Steve's image he tried was animated though.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 17, 2015, 06:12:08 PM
I worked out what it was. The file size is checked on the client side by way of the mOxie component in Plupload but it just sits and cries in the corner if you feed it an animated GIF. It's like feeding a Mogwai after midnight.

So in the 1.1 release I've changed that up to not check it on the client (since I can't reliably do it on the client) and switched it to only be done on the server instead.
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 17, 2015, 06:22:45 PM
I wasn't trying to upload an animated gif though. Let me go try it again anyway.


Edit: Still getting the error. This is the image I was trying to upload:


(http://i1262.photobucket.com/albums/ii614/OPStuph/all2/new-1.gif~original)
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 17, 2015, 06:23:34 PM
Yeah because I changed the code to the newer one since your previous test ;)
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 18, 2015, 02:02:09 AM
But Pete ... I'm still getting the error. I just tried it again with a different non-animated gif and as soon as I click the image after clicking 'Browse' I get:

 Something went wrong while uploading this item:
The image you tried to upload is too big. (newold2.gif)

Same thing if I try to drag and drop. And that image is 24 x 9 at 132 bytes.

Edit: jpg works fine.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 08:35:29 AM
Really? I wasn't getting it failing on normal GIF files, only animated ones - but in the version I have locally (not yet uploaded here), GIF is now excluded altogether on the client side check specifically for this sort of reason. I'll upload that here and see how that works out for you - you might have to clear your cache locally though since it's in the upload.js file.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 18, 2015, 10:23:18 AM
My animated one seems to have loaded ok now. ;)
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 10:31:17 AM
Yeah, I was using that as one of my exemplars for testing.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 18, 2015, 10:40:50 AM
Yeah, I was using that as one of my exemplars for testing.

Noticed there's no thumbnail image showing though. http://levertine.com/index.php?media/album/micks-miscellanious-pics.6/
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 10:42:58 AM
I see a thumbnail? It's not animated (intentionally) but it is there - even as a guest I can see that (because the album is open to guests)
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 18, 2015, 11:04:45 AM
I see a thumbnail? It's not animated (intentionally) but it is there - even as a guest I can see that (because the album is open to guests)

You're right it is there.  But thumb is not showing in IE11 though.  It's fine in firefox and chrome.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 11:21:29 AM
Ugh, I know why this is.

IE11 is actually doing something right for once. The others are seeing 'oh hey, we were told this was a PNG but it's a JPG, fine we'll show it', whereas IE11 is like 'hmm, you said it was a PNG, right? It's not, it's a JPG but you told us not to accept that, so... not happening.'

I wonder why it's generating a JPG though, that's weird.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 11:35:12 AM
OK, so I know the cause of that now and it's fixed in 1.1.1 :) There's a lot of permutations of stuff where it tries to be more efficient about what it does and I forgot to pass on certain parameters to make that work.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 18, 2015, 11:38:22 AM
Cheers Pete, you're a star mate.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 11:40:14 AM
Thanks :) Been a productive morning so far, one new feature, multiple bugs fixed, and I haven't even had my first cup of tea yet because I just know the phone call I've been waiting for will happen when I go out to make the tea, heh.
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 18, 2015, 01:49:10 PM
Okay, all seems to be well now. Thanks for fixing it. (http://i1262.photobucket.com/albums/ii614/OPStuph/newboard/smilies/ourplace/bow.gif~original)


Is 1.1.1 the latest currently available for download?
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 02:27:44 PM
1.1.0 is the latest public release, there's still a few things I want to get done before I push out 1.1.1.
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 18, 2015, 02:54:30 PM
Okay, thanks. If release is relatively imminent I'll wait for it instead of upgrading twice. :)
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 18, 2015, 04:04:31 PM
It's probably the next day or so. I'm trying to do small features and bug fixes as 1.x.1 or 1.x.2 packages with bigger features in 1.x+1.0 packages.
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 18, 2015, 04:07:22 PM
I'm good with however you decide to do it. :)
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 19, 2015, 09:14:17 AM
1.1.1 is out, so on with the breaking? :P
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 21, 2015, 12:54:28 AM
So, any more issues with this?
Title: Re: File size of 16 x 14 is too big?
Post by: Steve on January 21, 2015, 01:22:02 AM
Nope. Seems to be working just peachy now. 8)
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 21, 2015, 02:11:49 AM
Awesome. Then I'll close it and concentrate on the remaining things that need fixing and the various realms of improvements and awesomeness I can add.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 21, 2015, 09:41:12 AM
Pete, just a observation, you might have already mentioned this (i'll have a read through)

When I uploaded that little animated gif, it shows the thumbnail now.  But it's only animated when you first upload it, then when you view the item it's no longer animated.  Not a big deal, just wondered if that was how it was supposed to work now?
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 21, 2015, 09:49:03 AM
The thumbnail isn't animated, that's intentional - but the item itself is animated when I look at it...
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 21, 2015, 10:50:47 AM
The thumbnail isn't animated, that's intentional - but the item itself is animated when I look at it...

Sorry, for some reason it wasn't showing animated.  But just checking it again now it is. So apologies for wasting your time.  :-[
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 21, 2015, 11:17:22 AM
It's all good - I'd rather be asked and go back and check than it be wrong and not know about it.
Title: Re: File size of 16 x 14 is too big?
Post by: spoogs on January 28, 2015, 04:06:32 PM
I see this is marked as resolved but I'm experiencing this in Chrome and IE11.
My file is (much) larger than 16x14 but I pretty much set the quota such that about any file type and size should be fine.

Did not really want to start a whole new topic for this. No errors are thrown.
Title: Re: File size of 16 x 14 is too big?
Post by: lurk on January 28, 2015, 08:56:13 PM
I see this is marked as resolved but I'm experiencing this in Chrome and IE11.
My file is (much) larger than 16x14 but I pretty much set the quota such that about any file type and size should be fine.

Did not really want to start a whole new topic for this. No errors are thrown.

spoogs, can you attach a sample image, (one that fails) and I'll test it on my Xampp testbed.
Title: Re: File size of 16 x 14 is too big?
Post by: spoogs on January 28, 2015, 09:24:22 PM
Too large attach here
3522x2000
2.69MB

Uploads fine from admin account, hiccups on regular user account.
Title: Re: File size of 16 x 14 is too big?
Post by: spoogs on January 28, 2015, 10:37:52 PM
.... and with no changes made over the last 2-3 days all of a sudden it starts working.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on January 29, 2015, 01:39:34 PM
What hiccups do you get exactly? Curious in case this has an issue that needs reinvestigating.
Title: Re: File size of 16 x 14 is too big?
Post by: spoogs on January 30, 2015, 01:30:49 AM
Created a user, 'regular member', when I first installed LevGal I set the quotas to some insane limits since I'm messing about locally. Uploaded some files in bulk and that went without a hitch from my admin account. Just about every file I tried to upload from the regular member account failed with the message that the file was too large.

No matter which file I chose different pixels and sizes it always failed. I made no changes whatsoever and it eventually started to work. Its hard to determine the cause since it seemingly resolved itself. I'll create another user and see what happens.
Title: Re: File size of 16 x 14 is too big?
Post by: Arantor on February 01, 2015, 11:38:32 AM
File too large or image too large? They return different messages.

Also, JPEGs, PNGs, GIFs?

This is weird because while it was iffy before, it's seemingly been stable since I tweaked it :-/
Title: Re: File size of 16 x 14 is too big?
Post by: spoogs on February 01, 2015, 12:33:21 PM
To be completely honest, I do not remember exactly what it said. Since it resolved itself it hasn't happened again, even after several hundred uploads where I'm sure some images or files are larger than the one it originally choked on.