LabelHub Transfer App - LabelHub/labelhub.integration.documentation GitHub Wiki

LabelHub Transfer App

LabelHub have developed a small Windows 64bit application which can be installed locally and will run as a service. This service will automatically monitor AWS S3 and transfer files to your local server and vice versa on folders you setup to be transfered to AWS S3.

The application can monitor local folders(not network shares!) and will automatically trigger and upload if any files are dropped into a monitored folder.

Download

LabelHub Transfer App v1.0.8.14 (SHA1: e83b6c733371bb4ea270621318c638b9e3aa9da1)

The installation and the application itself is both digital signed by LabelHub Aps (Thumbprint: 00dd2cb4e735c576e972b76c60ccabe088)

Install

The installation needs administrative privileges to be able to install itself as a service. Either use "Run as administrator" or approve the request to elevate to administrative privileges during installation. It is recommended to install at the default location in C:\Program Files (x86)\LabelHub Filetransfer\.

Configuration

The default configuration just after installation does not monitor anything, even though the service will be techincal running. When installed for the first time a settingsfile will be copied into C:\Program Files (x86)\LabelHub Filetransfer\appsettings.json that looks like this:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.Hosting.Lifetime": "Information"
    },
  },
  "Credentials": {
    "AWS": {
      "AccessKey": "",
      "Secret": ""
    }
  },
  "Hotfolders": {
    "Upload": [
      //{
      //  "LocalPath": "C:\\something\\LabelHub\\upload\\xml",
      //  "Filter": "*.xml",
      //  "RemoteBucket": "labelhub-integration-l00???-test",
      //  "RemotePath": "from-erp-to-labelhub/todo/xml"
      //}
    ],
    "Download": [
      //{
      //  "RemoteBucket": "labelhub-integration-l00???-test",
      //  "RemotePath": "from-labelhub-to-erp/sr-pdf/",
      //  "LocalPath": "C:\\something\\LabelHub\\download\\sr-pdf",
      //  "IntervalSeconds": 10
      //},
      //{
      //  "RemoteBucket": "labelhub-integration-l00???-test",
      //  "RemotePath": "from-labelhub-to-erp/1up-pdf/",
      //  "LocalPath": "C:\\something\\LabelHub\\download\\1up-pdf",
      //  "IntervalSeconds": 10
      //},
      //{
      //  "RemoteBucket": "labelhub-integration-l00???-test",
      //  "RemotePath": "from-labelhub-to-erp/1up-thumbnail/",
      //  "LocalPath": "C:\\something\\LabelHub\\download\\1up-thumbnail",
      //  "IntervalSeconds": 10
      //}
    ]
  }
}

Note that you'll have to restart the service in order to reload the configuration after you made changes to it.

Either restart the service from [Control panel] -> [Services] -> Locate the service "LabelHub File Transfer Service" --> Right click and select "Restart". Or you can restart it by running this command at a console with administrative privileges:

net stop "LabelHub File Transfer Service" && net start "LabelHub File Transfer Service"

There is a couple of importation sections in this configuration:

Credentials

This is your AWS S3 credentials. During the setup of your account these credentials will be generated for you by LabelHub and you can contact your LabelHub representative if you do not have them already.

Hotfolders - Upload

You can specify multiple folders to monitor and automatically upload to AWS S3. Each hotfolder definition has a LocalPath and a Filter which tells the service what local folder you want to monitor and what extension to monitor for.

Note: The LocalPath MUST be local and cannot be a network share or similar!

The RemoteBucket and RemotePath indicates the destination of your files. If you haven't already been supplied with these, please contact your labelhub representative.

The service will continuously monitor the folder and as soon as new files, matching the filter, appear they will be transfered to AWS S3. The service will wait for any exclusive- and/or writelocks to be released before the file is transfered to AWS S3.

Hotfolders - Download

It is possible to specify multiple remote folders to monitor and download from. LabelHub supplies many different types of files for download. These are part of the agreement you've made with LabelHub and if some files do not show up as expected, please contact LabelHub.

Just as with the Upload-hotfolders, the Download hotfolders has an RemoteBucket and RemotePath which the service will check periodical according to the IntervalSeconds. Important note: The RemotePath should end with a /!