Files in ObjectGears


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.

        <!-- in kilobytes -->
        <httpRuntime maxRequestLength="1048576" />

Define maxAllowedContentLength setting in bytes.

               <!-- in bytes -->
                <requestLimits maxAllowedContentLength="1073741824" />

The last place is configuration parameter MaxFileSize. Define its size in bytes.

<setting name="MaxFileSize" serializeAs="String">

You can find further information in the documentation.