Files in ObjectGears
02.06.2016
ObjectGears system enables to insert coĺumn of the type File into a class. You can add more such columns and limit also type of inserted files to e.g. pictures, videos, documents...
In such way you can simply sort out inserted files/documents according to their purpose - product picture, technical documentation, user documentation.
You have to set maximal size of the enabled file. If the user loads too large file, than IIS rejects the whole web request.
Maximal size is set at three places in the web.config file of the web part of ObjectGears system.
Define maxRequestLength setting in kilobytes.
<configuration>
<system.web>
<!-- in kilobytes -->
<httpRuntime maxRequestLength="1048576" />
</system.web>
</configuration>
Define maxAllowedContentLength setting in bytes.
<configuration>
<system.webServer>
<security>
<requestFiltering>
<!-- in bytes -->
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
The last place is configuration parameter
MaxFileSize. Define its size in bytes.
<setting name="MaxFileSize" serializeAs="String">
<value>1073741824</value>
</setting>
You can find further information in the documentation.