File storage locations
File storage location for a branch
The Thinkwise Platform provides multiple options for storing files like documents and photos.
It is possible to deviate from the initially configured file storage location type. For example, the Software Factory writes its code files to disk (default) but this can be switched to AWS. Then, if a system flow contains a Write file connector using the reconfigured file storage, Indicium would write it to AWS S3.
To set the initial file storage location for a branch:
menu Integration & AI > File storage locations
-
In the field Storage location, enter a name.
-
Select the Storage type and configure the settings for the selected storage type.
- For more information about the available file storage types, see File storage types.
- File storage locations cannot be switched from or to storage type Database.
-
Optional. Enter a Max. size in MB to limit the file size that can be uploaded.
With a 3-tier Software Factory in the Universal GUI, you can store key values encrypted. See Encryption for a branch.
- To override these settings for a specific runtime configuration (for development and testing): menu Maintenance > Runtime configurations > tab File storage locations. See Runtime configurations for more information.
- To override these settings for an application in IAM: menu Authorization > Applications > tab File storage locations. See File storage locations settings in IAM.
Allow file types for file storage
For each file storage location, you can limit the file types that can be uploaded. To create a whitelist with allowed file extensions:
menu Integration & AI > File storage locations > tab Form > tab Extension whitelist
- Add the allowed file extensions.
Whitelist for allowed extensions in file storage
File storage types
The following file storage types are available:
- Azure blob - Azure Blob storage
- Azure files - Microsoft Azure file storage
- Database - Binary data in the database (BLOBs or SQL Server FileStreams)
- File system - On the file system
- FTP - File Transfer Protocol
- AWS S3 - Amazon Web Services, Simple Storage Service.
File storage locations can be linked to domains with File, Image (including Signature) and Folder controls. All storage types except Database are specified as an additional subfolder within the file storage location per column. Thus, a column inherits the main storage location from its domain, but files can be stored in a subfolder by setting the subfolder column property.
Subfolder column property
Azure Blob
Universal GUIWith Azure Blob Storage you can authenticate in two ways:
- A managed identity - select the checkbox Use managed identity.
Or:
- Enter the Tenant id, Client id, and the Client secret.
Azure blob storage location
Azure files
Azure files works with Microsoft's Azure File Storage.
Azure files has the same structure as any file system and allows for a nested folder hierarchy, for example, https://storageaccount.file.core.windows.net/files/image/image.png
.
A username and SAS (Shared Access Signature) token combination is required.
Up to and including Thinkwise Platform version 2022.2, a username and password were required for Azure files. For existing accounts this remains allowed until these data are cleared, then a username and SAS token will become mandatory.
To create an account for Azure file storage:
-
Log in to https://portal.azure.com.
-
Select the Storage Account service and add an account or use an existing storage account.
-
To find the login settings to be used in the Software Factory, select the storage account and navigate to the menu Shared access signature.
- For the Windows GUI and Web GUI, the only allowed option in Allowed protocols is 'HTTPS and HTTP'.
- To generate the SAS token: select the Signing key ('key 1') and click Generate SAS and connection string.
Protocol and SAS token in the Azure portal
-
Enter the data in the Software Factory:
- Enter the storage account name as Username.
- Enter the SAS token as SAS token.
- For Windows GUI and Web GUI, the only allowed Protocol is 'HTTPS'.
Azure storage location
Database
Database storage will store the data in a column on the database. Database storage needs two fields: one to save the file name of the uploaded file, and one to store the contents of the file. The storage column needs to be a large enough (unicode) text or binary field, for example varbinary(max) on SQL Server.
A database file column definition
SQL Server provides an additional way to store files in the database using FileStreams. To use file stream storage, the storage column needs to have a domain with datatype FILESTREAM. In addition, the database requires the table to have a ROWGUID column as well.
Required column datatypes for FileStreams
File system
File system storage stores the files in the specified path. The path property can either be a network location or a drive. Be aware that it must be a full
(rooted) path, for example \networklocation\files\
or C:\files\
and that the location is accessible by the user interfaces or the Indicium application tier.
Variables in a path are allowed. For example:
%APPDATA%\Thinkwise\file.txt
D:\files\%FileLocation%\file.txt
, where %FileLocation% is:thinkwise\textfiles
.
FTP
To use FTP storage, fill in the server name with the FTP server address, for example ftp://ftp.thinkwisesoftware.com
. Notice that in contrast to File system
storage, the Path property must be relative from the server address, for example files/
.
AWS S3
AWS S3 stands for Amazon Web Services, Simple Storage Service. The Bucket name, AWS region, Access key ID and Secret access key can be configured with the file storage.
AWS S3 file storage
Troubleshooting file storage
request_entity_too_large
When uploading a file, you might encounter the error message request_entity_too_large
(HTTP 413 error). It occurs when the file size exceeds the maximum allowed size.
To resolve this issue, check the following settings:
-
File storage location - The maximum file size is defined in the file storage location settings. See File storage location for a branch. If you did not configure a maximum file size here, then:
-
IIS - Check the maximum file size in the IIS settings and adjust
maxAllowedContentLength
inweb.config
if necessary:
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="30000000" /> <!-- default approximately 28.6 MB, can be adjusted based on the need-->
</requestFiltering>
</security>
</system.webServer>
</configuration>
- See also Understanding and Resolving the HTTP 413 (Request Entity Too Large) in IIS.
- For the same issue in an Azure environment, see File upload issue in Azure Application Gateway.
Problem in IAM with changed folders
Indicium Basic Windows GUIWhen using Indicium Basic, a problem may arise in IAM when file storage folders have been changed in a model while its GUID has remained identical. The cause of the problem is the loaded and cached information about file storage folders to decrease startup time.
Two extended properties are available to circumvent this issue:
IndiciumModelContainsFileStorageFolders
- If set toyes
ortrue
, the Windows GUI will assume that the model contains file storage folders that can change, and it will not cache information when starting the application. This leads to a structurally increased startup time but is guaranteed to work around issues with file storage folders.IndiciumIncludeApplicationIdInCache
- If set toyes
ortrue
, the Windows GUI will add an application ID to the GUID to identify local caches. This prevents the issue, but only if file storage folders do not change for an application after it has been published. The issue will occur again if you change the file storage configuration in IAM for a live application. In that case, generate a new model GUID to ensure that local caches are invalidated. This is a manual action and is not done automatically in IAM.
Both properties are set to false
or no
by default.