Howtoincreasethemaximumattachmentsize
|
Question
|
How to increase the maximum attachment size
|
|
Answer
|
If you try to upload a large file as an attachment, you might receive an error. This is caused by two limits:
- Some database servers have a limit on the maximum size of an action. For example, a default mysql installation permits only 1 megabyte statements to be executed. You can increase this limit if you have access to the server. For mysql, see http://dev.mysql.com/doc/mysql/en/Packet_too_large.html .
- XWiki has a maximum attachment size of about 10 megabytes. You can increase this limit by following the next steps:
- edit the XWiki.XWikiPreferences class and add a NumberProperty field of type long, named upload_maxsize; if the field already exists, you can skip this step
- edit the XWiki.XWikiPreferences object and specify the desired maximum attachment size (in bytes)
|