Introduction to file storage
The Thinkwise Platform provides several options for storing files, like documents and photos, with your application.
The file storage location can be set for a branch or a runtime configuration, and can be overridden in IAM. For more details, see File storage locations in the Software Factory.
Five different 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
File storage types
With Azure Blob Storage you can authenticate in two ways:
- A managed identity - select the checkbox Use managed identity.
- Enter the Tenant id, Client id, and the Client secret.
Azure blob storage location
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,
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 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 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
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:
D:\files\%FileLocation%\file.txt, where %FileLocation% is:
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
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
It is possible to use different file storage locations for different runtime configurations. This allows you to, for instance, specify different locations for your development, test, acceptance and production environments. For more information, see runtime configurations.
Troubleshooting file storage
Problem in IAM with changed foldersIndicium Basic Windows GUI
When 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 to
true, 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 to
true, 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
no by default.