---
name: "WebCommon.setKayaMaxPost"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/WebCommon.setKayaMaxPost"
---

# WebCommon.setKayaMaxPost(3kaya)

Sets the maximum size of POST data

## NAME

WebCommon::setKayaMaxPost - Sets the maximum size of POST data

## SYNOPSIS

**Void setKayaMaxPost(** *Int newmax* **)**

## ARGUMENTS

**newmax** The maximum size in bytes

## DESCRIPTION

Sets the maximum size of POST data (in bytes) that the webapp or CGI will accept. This has no useful effect unless called from a **webconfig**  function, as it will have already been called by then. POST data received above this size will be **entirely** discarded.

The default value if this function is not called is 2097152 bytes (2 megabytes), unless the **HTTP\_KAYA\_POST\_MAX\_SIZE**  environment variable is set. This will generally be sufficient unless you are handling large file uploads.

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**WebCommon.setKayaUploadDir (3kaya)**
