How can i raise the upload limit for files and images?

It is necessary to modify the node.conf to raise the upload limit for files and images within Gentics CMS.

1 Change $MAX_FILESIZE

The parameter $MAX_FILESIZE needs to be changed to the desired size.

/Node/etc/node.conf

$MAX_FILESIZE = "64M";

2 Disable $MAX_FILESIZE for specific groups

It is also possible to disable the maximum filesize for specific groups.

/Node/etc/node.conf

// groups without MAX_FILESIZE
// the configuration may be based on group IDs or names
$NO_MAX_FILESIZE = ["Node Super Admin", "Editor"];

Users of the specified groups will be able to upload extremely large files, which can cause problems, e.g. during the publish process.

3 Restart

A tomcat restart is needed after changing the setting:


/Node/bin/nodectl restart tomcat

4 Publishing of larger files

4.1 Filesystem publishing

During the publish process, files will be linked (standard) or copied into the publish directory. This works with files of any size.

4.2 Content repository publishing

When publishing files into a content repository, it might be necessary to increase the setting “max_allowed_packet” in the MySQL configuration of the target MySQL server (where the content repository is). If the setting is too low, the publishing process will fail and you will get a “com.mysql.jdbc.PacketTooBigException: Packet for query is too large”-error in the gentics.log. The setting should be at least twice the value of $MAX_FILESIZE, because the content will be escaped during transfer. It might also be necessary to incrase the JVMs memory size. See: ยป Optimierung Tomcat JVM Speicher

5 Import

For raising the maximum filesize for the file upload of imports you have to change the settings “post_max_size” & “upload_max_filesize” in php.ini.

6 CRSync – File synchronization

See: CRSync – file synchronization