File storage
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
Azure Blob
With 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
Runtime configurations
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.