Pular para o conteúdo principal

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​

LayerSettingDefaultWhat happens when the file is over the limit
Web interfaceGeneral:MaxFileSize104857600 (100 MB)The screen shows a size limit message before sending the file
Signer server (Kestrel or IIS in-process)General:MaxUploadSizeInBytes106954752 (102 MB)The server rejects the request with status code 413
IISmaxAllowedContentLength in web.config1073741824 (1 GB)IIS rejects the request before it reaches Signer
Reverse proxy (Nginx)client_max_body_size1m (1 MB), if the directive is missingNginx 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).

  1. In the General section, set MaxFileSize to the file size:

    "General": {
    "MaxFileSize": 209715200,
    "MaxUploadSizeInBytes": 210763776
    }
  2. Set MaxUploadSizeInBytes to at least 1 MB (1048576 bytes) more than MaxFileSize. The extra room covers the multipart request envelope (the format that carries the file and the other form fields).

  3. If Signer runs on IIS and the size is over 1 GB, raise maxAllowedContentLength in the web.config of the site folder. The Signer package ships this file. On every update, apply the change again.

  4. If an Nginx sits in front of Signer, set client_max_body_size to the same value as MaxUploadSizeInBytes in the site's server block:

    client_max_body_size 201m;

    Do the same on any other proxy or load balancer between the user and Signer.

  5. Restart Signer and reload Nginx (nginx -s reload).

warning

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.

note

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.

See also​

View as Markdown