Skip to main content

gfpdf_template_max_upload_size

Description​

The PDF Template Manager accepts template zips up to 32MB, or your server's upload limit if it's lower. Use this filter to change the limit, in bytes.

note

The limit can't go above your server's upload_max_filesize or post_max_size PHP settings.

Version​

This filter was introduced in Gravity PDF 6.18.0.

Parameters​

$max_size | int​

  • The limit, in bytes. Default 32MB, or the server's upload limit if it's lower.

Usage​

Lower the limit to 5MB:

add_filter( 'gfpdf_template_max_upload_size', function( $max_size ) {
return 5 * MB_IN_BYTES;
} );

Source Code​

This filter is located in the Helper_Templates::get_max_upload_size() method of /src/Helper/Helper_Templates.php.