The File Exchange container allows Trust1Connector to upload or download files from the filesystem to the requesting party. In order to be able to access the file system, a separate file_exchange consent is required, only when the consent has been configured to true upon installation of the T1C-GCL.
The File Exchange container provides the following functionalities:
selecting a folder based on application type
listing files in selected application type
downloading one or more files into selected application type
uploading one or more files from the selected application type
An application type resolves locally to an absolute file system path.
An application can create additional folders for a given application type, those folders are relative to the absolute path which has been locally mapped on the application type.
The File Exchange container provides additionally:
optional progress bar for file transfers
optional user notification for file transfer completion
user notification when browser is closed during file transfer
implicit user consent based on pre-defined algorithm using the operating system clipboard
copy and move files between application types
Notifications
The File Exchange container allows the application to choose whether to notify the users in the application context, or to delegate notification to the T1C. The T1C uses the underlying operating system to notify users. One type of notifications are provided:
Modal information
Context and scope
The context of a type mapping is defined by the following concepts:
applid (property of Type class): a string value denoting the application identifier. This is the root context for entity mapping
entity: a string value denoting the root entity for types mapping
type: a string value denoting a file typing, related to the absolute path mapped by an user, this value abstracts absolute paths from an application perspective
The following image depicts the file exchange object model:
Type Mapping
A 'Type' in the context of the File Exchange container, is a label, used by an application, to abstract the absolute path reference of the local file system. A 'Type' allows the application to perform file transfers, without the notion of the local file system organization. The File Exchange container maps the absolute path, chose by a user, on the application scoped label. We call this action a 'type mapping', this is, an absolute path, in the context of an application, is references by a label.
A user can chose to 'persist' the Type mapping, or can decide to assign an absolute path for each individual transaction.
Bulk File Transfer
The File Exchange container allows for bulk file transfer. The individual methods are stateless requests to the T1C-GCL service, and allows to up- or download one or more files from a user perspective. The progress information can be retrieved by the application for each file separately or for all the actions running on the T1C-GCL service.
Type subfolders
Subfolders can be managed by the application. All subfolder are relative paths and when requested can be created, optionally recursively, by the File Exchange API. It's important to understand:
Type mapping : correlates to absolute paths on a local file system
Type subfolders: correlates to relative paths on a local file system
The File Exchange container maintains the mapping for absolute paths. Relative paths will be created when used in the specified use case. Neither absolute paths or relative paths will result in deletion on the local file system! When deleting a 'type' (aka absolute path), the type will be removed from the File Exchange container, but the references directory will still exist on the user's file system.
In the File Exchange API, the parameter relpath refers to an array of strings denoting a directory path.
Responses
The File Exchange API can be integrated using Promises or callbacks. Both are returning the same result.
Language
The language, used for OS modals, is determined by the language parameter passed on initialization of the library, as one of the GCLConfig parameters. The languages parameter can take the value: en (English), nl (Dutch), fr (French), de (German) and defaults to en (English).