wyona / yanel

http://www.yanel.org
Apache License 2.0
10 stars 5 forks source link

Make file upload size configurable inside yanel.xml #38

Open michaelwechner opened 12 years ago

michaelwechner commented 12 years ago

See for example the following suggestion

http://lists.wyona.org/pipermail/yanel-development/2009-February/003123.html

csstaub commented 12 years ago

Not sure what you mean by this. Can you be more specific?

michaelwechner commented 12 years ago

Sorry, but somehow the link didn't make it into the description, but it should be there now. Please let me know if it is still unclear.

csstaub commented 12 years ago

So basically, what's need is to add a new property/configuration option to yanel.xml, parse that on init and then pass the value on to the factory in the HttpRequest class. However, would it not make more sense to have the limit being set-able by the resource? I can see that different resources (or different realms in Yanel) may want/have different limits for file uploads rather than one single global limit/value.

michaelwechner commented 12 years ago

the value inside yanel.xml would be the default value, but which can be overwritten by a resource and hence configurable per realm.

IIRC this is what http://lists.wyona.org/pipermail/yanel-development/2009-February/003123.html is suggesting.

michaelwechner commented 10 years ago

The maximum file size is now configurable inside web.xml, whereas see

 <filter>
  <filter-name>YanelFilter</filter-name>
  <filter-class>org.wyona.yanel.servlet.communication.YanelFilter</filter-class>
  <init-param>
      <param-name>max-file-size</param-name> <!-- in bytes -->
      <param-value>-1</param-value> <!-- value '-1' means that there is no limit -->
    <!--
      <param-value>3000000</param-value>
    -->
  </init-param>
</filter>
michaelwechner commented 10 years ago

We need to add some documenation about this