Setup External storage Estimated reading: 4 minutes Limbas provides the ability to configure individual folders so that files are not stored on the Limbas server but in external storage, for example a Cloud. External Storage For each external memory a description can be given, which will be displayed in the title of the file after the upload. The super-admin can select these in the desired folder via the context menu Extras → Settings → external storage and thereby determine that future files of this folder will be uploaded to the selected storage. Note: The setting only affects files that are uploaded after the conversion. Files already in the folder are not transferred to the external memory. Services Providers of external storage (e.g. clouds) are hereafter referred to as services. Since the communication with them differs from service to service, a separate PHP class LmbExternalStorage_{ServiceName} is expected for each service. Already implemented are the services Dropbox, OwnCloud and SeaFile. For connecting to “NextCloud”, “OwnCloud” should be selected since they both have the same interface. If you want to connect your own service, a new class LmbExternalStorage_{NewServiceName} must be created by extension, which inherits from the existing class LmbExternalStorage, and thus the methods uploadFile, downloadFileand createDownloadLink must implement. Then enter {NewServiceName} in the Classname field. Configuration A service requires a token or a username-password-combination for authentication. Sometimes a direct folder-directory is expected additionally. Information, that requires a service, is entered in the Conifg field as JSON. The files are then directly transferred to the corresponding class by the constructor. This design makes it easy to use multiple accounts of the same service. External Access URL If the field External Access URL is set, the file transfer from browser to cloud is not managed by the Limbas server, but by the specified server. This can be useful from a security/ bandwidth standpoint. During the SOAP call, the Limbas server is notified by the new file, so that it can be displayed and authorized in the DMS. Example: Der value http://192.168.1.42/public/ leads to the following two scenarios: Upload If a user selects a file to upload in the DMS or in a Limbas dataset, the browser sends it directly to the script http://192.168.1.42/public/upload.php. The file is loaded into external storage and the Limbas server is notified of the receipt of the file. Download If a user opens a file in the DMS or in a Limbas dataset for preview, the call with file ID and authorization token is forwarded to http://192.168.1.42/public/download.php. The script loads the file from the external storage and makes it available to the user. In the folder limbas_src/extra/explorer/external/proxy/ the files mentioned above are implemented by way of example upload.php and download.php, as well as the two externalStorage.lib, which can be copied onto the external server and edited. In the files upload.php and download.php 3 paths have to be adjusted, among others, the include.lib responsible for SOAP accesses. In this file the path to the configuration file config.lib has to be set. Public Cloud The Public Cloud flag can be set if publishing individual files with a fixed link beyond Limbas is desired. When uploading a file, a public (non-protected) download link for the respective file is generated once from the external storage (cloud) and stored in Limbas. When downloading the file from Limbas the user is forwarded to this download link and can pass it on. Summary Setup This is a step-by-step summary of how the setup with (for example) the Nextcloud-Demo works. A folder is created in Nextcloud, where all the files are stored. Here, its name is “Limbas”. In Limbas, under Admin -> External Storage, a new entry is created (the folder “Limbas” created in step 1 is selected here). Session reset (top right) The folder with the files that are to be stored in the Nextcloud is now opened in the DMS. Important to note: The existing files aren’t synchronized automatically, only the files that are added from now on are. In the opened folder, under Extras -> Settings, the newly created Nextcloud entry is selected. Important to note: The current folder is linked, not the one selected in the DMS. Save in the DMS top left unter File -> Save. Afterwards reset the session again (top right). Now a new file can be uploaded. This will automatically be uploaded to the Nextcloud instead of being stored in LIMBAS.