Configuration Overrides

Smartreader Embedded reads configuration values from layered JSON files. During development the defaults live in SmartReaderStandalone/appsettings.json, while deployed readers load /customer/appsettings.json at runtime. Adjusting settings in either location lets you tailor limits and credentials without rebuilding the application logic.

How configuration files are loaded

  1. Base defaults – SmartReaderStandalone/appsettings.json ships with the application image. Edit this file before building a custom CAP to change the out-of-box defaults.

  2. Site-specific overrides – /customer/appsettings.json is mounted on the reader and is always loaded with reloadOnChange: true. Update this file (for example via RShell or SCP) when you need to adjust settings after deployment.

  3. Environment variables – values such as <<ENV:BasicAuth__Password>> in customsettings.json expand from environment variables when the CAP is packaged, letting you inject secrets without storing them in source control.

After editing any configuration file, reload the Smartreader Embedded application from the Actions β†’ Reload Application button or reboot the reader so the new values are applied across all services.

Upload limits

The certificate upload endpoints in the REST API enforce limits defined under the UploadLimits section. Override these values when you need to accept larger files or retain a deeper history of uploaded certificates.

Parameters

  • UploadLimits:MaxFileSizeBytes – Maximum size of an uploaded file in bytes. The default is 5,242,880 (5 MB).

  • UploadLimits:MaxFilesPerDirectory – Number of files retained in each upload directory before the oldest file is pruned. The default is 5.

Updating the limits on a deployed reader

  1. Connect to the reader shell and open /customer/appsettings.json for editing.

  2. Locate or add the UploadLimits object.

  3. Set the desired values, for example:

    {
      "UploadLimits": {
        "MaxFileSizeBytes": 10485760,
        "MaxFilesPerDirectory": 12
      }
    }
  4. Save the file and reload the application (or reboot the reader). Subsequent uploads immediately honor the new limits, and the REST API will reject files that exceed MaxFileSizeBytes or prune directories that exceed MaxFilesPerDirectory.

Updating the limits before building a CAP image

  1. Modify the UploadLimits section in SmartReaderStandalone/appsettings.json.

  2. Rebuild the CAP so the updated defaults are bundled into the deployment package.

  3. Optionally mirror the same values in SmartReaderStandalone/customsettings.json if you rely on environment substitutions when generating the package.

Remember that any values defined in /customer/appsettings.json take precedence over the bundled defaults. Keep the files in sync to avoid confusion when troubleshooting upload rejections.

Last updated