Upload size limit
An upload goes through several layers before it reaches Signer. Each layer has its own size limit. The upload works only if the file fits all of them. By default, Signer accepts files of up to 100 MB.
The layers
| Layer | Setting | Default | What happens when the file is over the limit |
|---|---|---|---|
| Web interface | General:MaxFileSize | 104857600 (100 MB) | The screen shows a size limit message before sending the file |
| Signer server (Kestrel or IIS in-process) | General:MaxUploadSizeInBytes | 106954752 (102 MB) | The server rejects the request with status code 413 |
| IIS | maxAllowedContentLength in web.config | 1073741824 (1 GB) | IIS rejects the request before it reaches Signer |
| Reverse proxy (Nginx) | client_max_body_size | 1m (1 MB), if the directive is missing | Nginx rejects the request with status code 413 |
The web interface sends files larger than General:SegmentedUploadThresholdMB (default: 10 MB) in parts. So a proxy
with a small limit can work in the web interface and fail on API calls, which send the whole file in one request.
How to raise the limit
Follow the steps for the size you want to accept. The example uses 200 MB (209715200 bytes).
-
In the
Generalsection, setMaxFileSizeto the file size:"General": {"MaxFileSize": 209715200,"MaxUploadSizeInBytes": 210763776} -
Set
MaxUploadSizeInBytesto at least 1 MB (1048576bytes) more thanMaxFileSize. The extra room covers the multipart request envelope (the format that carries the file and the other form fields). -
If Signer runs on IIS and the size is over 1 GB, raise
maxAllowedContentLengthin theweb.configof the site folder. The Signer package ships this file. On every update, apply the change again. -
If an Nginx sits in front of Signer, set
client_max_body_sizeto the same value asMaxUploadSizeInBytesin the site'sserverblock:client_max_body_size 201m;Do the same on any other proxy or load balancer between the user and Signer.
-
Restart Signer and reload Nginx (
nginx -s reload).
Edit the JSON file with a plain text editor. Curly quotes (“ and ”), common in text copied from an e-mail or a
document, make the JSON invalid, and the application does not start.
Files of hundreds of MB use more memory and time when the document is processed. Test the size you want to accept in staging before you change production.
Storage
Signer keeps the original file and the versions the document gets along the flow, such as the signed versions. The space a document uses is larger than the uploaded file. Keep this in mind when you raise the limit and when you plan the Blob Storage.