Skip to main content
Topic: 413 Entity too large not catched by D&D attachments upload (Read 4380 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

413 Entity too large not catched by D&D attachments upload

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.

Any idea how to prevent that?
Maybe @Joker™ ?
Bugs creator.
Features destroyer.
Template killer.

Re: 413 Entity too large not catched by D&D attachments upload

Reply #1

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

Re: 413 Entity too large not catched by D&D attachments upload

Reply #2

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.

Any idea how to prevent that?
Maybe @Joker™ ?
@emanuele ..Can you tell me a scenario to produce the steps so I can work on the same

Quote from: Spuds – 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
Yup, seems to be a nice bug :P...

Re: 413 Entity too large not catched by D&D attachments upload

Reply #3

IIRC that "bug" is NGINX related,
Code: [Select]
client_max_body_size	20M;
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)

 
Thorsten "TE" Eurich
------------------------

Re: 413 Entity too large not catched by D&D attachments upload

Reply #4

3-4 MB are large files? :o  We have files with 5-6 MB as attachment.

Re: 413 Entity too large not catched by D&D attachments upload

Reply #5

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 ;)
Thorsten "TE" Eurich
------------------------

Re: 413 Entity too large not catched by D&D attachments upload

Reply #6

I suspect that the definition of "big" in this case depends mainly on the server config. ;)
Bugs creator.
Features destroyer.
Template killer.

 

Re: 413 Entity too large not catched by D&D attachments upload

Reply #7

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

Re: 413 Entity too large not catched by D&D attachments upload

Reply #8

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.

Just off the topic, here's something strange Joker is trying to do with like mod. Basically, I'm trying to display data for like posts mod (SMF) in a single page application mode.

Benefits I can think of:
1. Reduces the number of queries - as when I know a data is already loaded for a tab, I won't be loading it again.
2. Some fun with UI
3. I can spill bugs all over the place ;D

So what do you guyz/gurlz think of this. We can port this for elkarte as well with minimal effort :-X

Re: 413 Entity too large not catched by D&D attachments upload

Reply #9

Quote from: Joker™ – Hey guys, sorry for going into invisible mode again.
The official whipper is already on the move. :P

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.
Yep, I prefer write bugs than squashing them. :P

Quote from: Joker™ – Just off the topic, here's something strange Joker is trying to do with like mod. Basically, I'm trying to display data for like posts mod (SMF) in a single page application mode.
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).

Quote from: Joker™ – 3. I can spill bugs all over the place ;D
This is a good thing! ;D
Bugs creator.
Features destroyer.
Template killer.

Re: 413 Entity too large not catched by D&D attachments upload

Reply #10

Quote from: Joker™ – Hey guys, sorry for going into invisible mode again.
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.
Quote from: Joker™ – Just off the topic, here's something strange Joker is trying to do with like mod. Basically, I'm trying to display data for like posts mod (SMF) in a single page application mode.

Benefits I can think of:
1. Reduces the number of queries - as when I know a data is already loaded for a tab, I won't be loading it again.
2. Some fun with UI
3. I can spill bugs all over the place ;D

So what do you guyz/gurlz think of this. We can port this for elkarte as well with minimal effort :-X
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

Re: 413 Entity too large not catched by D&D attachments upload

Reply #11

Quote from: emanuele – The official whipper is already on the move. :P
:'(


Quote from: emanuele – Yep, I prefer write bugs than squashing them. :P
Lol, Joker demands more of this :)


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: emanuele –
Quote from: Joker™ date=1403272201 link=topic=1480.msg10247#msg10247] 3. I can spill bugs all over the place ;D [/quote] This is a good thing! ;D [/quote] ;D [quote author=Spuds – .msg10254#msg10254 date=1403298471]
Still the same, the error is just sent to the console and not "handled" so to speak.
PR generated , with bugzzzz ;D


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 :)