Configure Smart API server to delete temporary files - Intergraph Smart Electrical - Installation & Upgrade

Intergraph Smart Electrical Smart API Installation and Configuration Guide

Intergraph Smart Electrical
Installation & Upgrade

When performing an action involving Smart Electrical files (such as retrieving files), each file is saved on the server in the \Files folder. For an example of a request that involves copying a file to this folder, see Download and save documents as PDFs and refer to the procedure Post request for document and PDF name. In the request results, the value of the 'FileName' parameter appears.

By default, the software is not configured to delete these files, therefore in time, many files may accumulate in the \Files folder, taking up a large amount of space on the server. A setting in the web.config file can be used to determine whether the files in the \Files folder are deleted whenever the Smart API application is started on the server machine.

  1. In the folder ..SEL WEB API\V2.0, open the web.config file.

  2. Go to the 'ClearHistory' setting, which by default is as follows:

    <add key="ClearHistory" value="false" />

    This value sets the temporary files to never be deleted.

  3. To change the setting to delete the files in the \Files folder whenever the Smart API application is started, do the following:

    1. Change the value of the setting from 'false' to 'true'.

    2. Save the web.config file.