Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Question on File Upload and maximum filesize

    Hi Isomorphic,

    can you explain how exactly File Upload works? I do see a POST request in Chrome's F12 tools, but not the real data. With Firefox I I can see the data (when clicking resend request).
    If I copy the data there to notepad++, I can see that the data size in my case is 5MB, which matches the file I wanted to upload (plus some multipart stuff).

    Now this upload is allowed by my .ds.xml, which is set to allow 8MB files:
    Code:
            <field name="DATA" type="binary" required="true" maxFileSize="8388608">
                <title><fmt:message key="file" /></title>
            </field>
    But in my Tomcat's server.xml. maxPostSize is set to 2 MB (the default):
    Code:
    <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" maxSavePostSize="65536" maxPostSize="2097152" />
    But the upload works anyway. Is there some reason for it or am I doing something wrong with my Tomcat configuration? I don't think so, because the maxSavePostSize is working as expected.


    By the way, this setting is very relevant w.r.t. relogin. The Tomcat default of 4 KB for maxSavePostSize is very little for complex requests or queues.
    If a timeout happened and such a request follow, relogin will not work, as a Tomcat error page is returned ("The request body was too large to be cached during the authentication process"), which does not contain the relogin marker. Perhaps you can add to the Wiki or the Relogin docs that this setting might be too low by default (most likely re-configuring the error page to contain the relogin marker would work as well, I did not try that though).

    Best regards
    Blama

  • #2
    File upload uses a standard form POST to a hidden iframe.

    We’re not sure how specifically you are inspecting this with browser tools, but we’ve never had an issue with using them on this very normal type of request.

    As far as that Tomcat setting seemingly not being applied, most likely you are looking at a <Connector> block that isn’t the active one, or looking at the wrong file. That setting is known to work and there is no way we can circumvent it.

    Comment


    • #3
      Hi Isomorphic,

      OK, thanks. I expected that because I can't think of an other way either.. Then I'll look further here.

      Best regards
      Blama

      Comment

      Working...
      X