Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on June 02, 2014, 04:02:02 pm
Title: 413 Entity too large not catched by D&D attachments upload
Post by: emanuele on June 02, 2014, 04:02:02 pm
Apparently a "413 Entity too large" error can slip through the errors detection in the drag&drop attachments upload. That means the files are reported as properly uploaded, but in fact they are not.
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: Spuds on June 02, 2014, 09:42:56 pm
Joker is the best for this one :D
As a guess, the .fail area of the DD script only console logs the error, should also do a numAttachUploaded--; as well as fill in a populateErrors({ }); object
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: Joker™ on June 04, 2014, 10:24:09 am
Quote from: emanuele – Apparently a "413 Entity too large" error can slip through the errors detection in the drag&drop attachments upload. That means the files are reported as properly uploaded, but in fact they are not.
As a guess, the .fail area of the DD script only console logs the error, should also do a numAttachUploaded--; as well as fill in a populateErrors({ }); object
Yup, seems to be a nice bug :P...
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: TE on June 04, 2014, 11:32:06 am
is the related ocnfig in nginx.conf, the value is too low for large attachments.. not sure if there's a chance to catch that bug error..
But I believe there's another bug: attachment's are uploaded twice, First time is by using D&D, second one is after submitting the post. Noticed this on elkarte.net while testing the upload of large files (3-4MB)
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: Jorin on June 05, 2014, 02:19:07 am
3-4 MB are large files? :o We have files with 5-6 MB as attachment.
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: TE on June 05, 2014, 02:20:47 am
Quote from: Jorin – 3-4 MB are large files? :o We have files with 5-6 MB as attachment.
Nope,.. but big enough to reproduce that issue ;)
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: emanuele on June 05, 2014, 03:31:35 am
I suspect that the definition of "big" in this case depends mainly on the server config. ;)
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: Spuds on June 05, 2014, 08:58:10 am
in php.ini upload_max_filesize = the largest single file you will allow, say 10M post_max_size = the largest post you will allow, so if you want to allow 10 attachments of 10M this needs to be 100 + some buffer for the rest of the $_POST response.
the nginx config should have its client_max_body_size = what you put in php.ini post_max_size client_body_timeout = may need to tweak this up if really allowing a lot of large files etc.
nginx should fail with a 413 and close the connection if its told the file is to big ... http://nginx.2469901.n2.nabble.com/client-max-body-size-and-100-Continue-413-Request-Entity-Too-Large-td7582547.html#a7582554 is interesting as well, that was fixed in 1.2.7 and I think we are 1.2.1
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: Joker™ on June 20, 2014, 09:50:01 am
Hey guys, sorry for going into invisible mode again.
So I hope that the issue is still open(as I'm in coding mood :D) and I can work on the same by taking an update from master branch.
Quote from: Joker™ – So I hope that the issue is still open(as I'm in coding mood :D) and I can work on the same by taking an update from master branch.
I'm not entirely sure what you mean, but if I got it right and IIRC it's what @Spuds wanted to do with the profile page at the beginning (i.e. load each tab with ajax when the button is clicked).
No worries, seems to be a busy time of the year of lots of folks!
Quote from: Joker™ – So I hope that the issue is still open(as I'm in coding mood :D) and I can work on the same by taking an update from master branch.
Still the same, the error is just sent to the console and not "handled" so to speak.
Ah coolness 8) .... Thats is what I had in mind to do on 1.1 for the profile tabs. Right now the tabs are all loaded with the single page which is not terribly efficient and why there are not more tabs. I wanted to make those tabs load instead with ajax when selected and then add even moar tabs such as likes, mentions, etc ... if it can be back ported that would very cool ;D
Title: Re: 413 Entity too large not catched by D&D attachments upload
Post by: Joker™ on June 21, 2014, 03:44:54 am
Quote from: emanuele – I'm not entirely sure what you mean, but if I got it right and IIRC it's what @Spuds wanted to do with the profile page at the beginning (i.e. load each tab with ajax when the button is clicked).
Well since past 3 years I making mobile apps using phonegap, HTML5, iOS and now working with swift and all of them(apps) had one common thing, there were single paged. Hence, we are even able to do long polling instead of getting into too much of page data hassles with server. What we mostly do is store the data is storage layer and when there is some sort of update, we get the broadcast in long polling and only specific object/array is update, hence specific UI has to be changed/updated instead of workout on whole page.
Quote from: Spuds – Ah coolness 8) .... Thats is what I had in mind to do on 1.1 for the profile tabs. Right now the tabs are all loaded with the single page which is not terribly efficient and why there are not more tabs. I wanted to make those tabs load instead with ajax when selected and then add even moar tabs such as likes, mentions, etc ... if it can be back ported that would very cool ;D
Well after so many weeks, I'm completely free today, and willing to wrap up this feature for like mod by today itself :)