Set the Maximum Attachment Size

Last modified by Eleni Cojocariu on 2026/09/18 15:33

Steps

The largest file that may be attached to a Page is a preference of the wiki, upload_maxsize, expressed in bytes. The standard flavor ships it at 107374182400 (100 GB), and where no value is set at all XWiki falls back to 33554432 (32 MB). No Administration screen exposes it, so the value is edited in the object editor of the wiki preferences. Attachments introduces the other limits an administrator can put on an upload.

  1. Open the object editor of the wiki preferences.
    http://<yourwiki>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object
  2. Select the "XWikiPreferences 0" line, under "Objects of type XWiki.XWikiPreferences (1)". What follows the object number is the wiki's own title preference, so it reads differently on every wiki.

    xwikipreferences-object-editor.png

  3. Scroll down to "Maximum Upload Size" and replace the value with the number of bytes you want to allow.

    maximum-upload-size-field.png

  4. Scroll to the bottom of the form and select "Save".
  5. Attach a file larger than the new limit to any Page: the upload is refused, and the notice quotes the limit you have just set.

    attachment-size-refused-notice.png

XWiki reads this preference the way it reads a Page's other preferences, so the wiki is not the only level it can be set at: putting the same upload_maxsize field on the WebPreferences Page of a Page tree gives that tree a limit of its own, which is how one part of a wiki is allowed larger uploads than the rest. A subwiki inherits nothing from the main wiki here, so every wiki needs its own value.

FAQ

A file is still refused after I raised the limit. Why?

Once an attachment has failed to upload, the browser may hold on to the old limit. Clear its cache and attach the file again.

Related

Get Connected