File Uploader ADC Service
This web service is used with the ADC upload, camera and microphone which allows you to upload files during a web survey only.
Note: this ADC requires custom installation and testing/troubleshooting - should you require assistance from Askia for this, it is classified as non-standard support and is likely to incur consulting fees. Please contact your key account manager for further clarification.
Pre-requisites
Windows features (Control Panel -> Turn windows features on or off).
- Windows Communication Foundation
- WCF Service
- Internet Information Service
Installation1. Create an IIS Application pool called FileUploader on the server as below:
2. Run the Setup.exe file as administrator.
3. When asked, enter the directory where you would like to install the service, as well as the App Pool that
will be used.
.
ConfigurationOn navigation to the specified "Virtual Directory" you'll see a file called config_staging.json. This JSON file has 4 variables:
Authentication and CredentialsThe difference between the Credentials and the Authentications is that the Credentials store the private FTP details and the Authentication stores the keys to the relevant Credential.AuthenticationsA typical authentication may look like this. You can have multiple authentications stored within the array, separated by commas.
To generate the ApiKey and SecretKey values you can use a site like random.org: https://www.random.org/strings/
Make the lengths for the ApiKey value different to the SecretKey value
A typical credential may look like this. Again, you can have multiple credentials separated by commas.
When this service is used with any file/media upload ADC (see QEX file), the following fields are needed:
- URL: This should refer to the public address of the FileSwitcherService.svc.
- API Key: This should refer to the ApiKey for the relevant Authentication.
- Secret Key: This should refer to the SecretKey for the relevant Authentication.
IMPORTANT: encrypt API & Secret Keys before setting them in the ADC's properties.
Browse the index.html page located at the root of the FileUploader folder: http://[SERVERNAME]/FileUploader/index.html
Insert the API and Secret Keys and press "Encrypt keys and Generate Token".
Add the encrypted keys to the ADC's properties.
Variable | Type | Description |
Authentication | Array | Array storing the various Authentications |
Credential | Array | Array storing the various Credentials |
TemporarySaveLocation | String | Path to a temp directory on the server where files are stored before FTP |
Variable | Type | Description |
Server | String | The name for the FTP server |
PortalId | Number | A unique single digit ID |
ApiKey | String | A string of random letters to be used as authentication token |
SecretKey | String | A string of random letters to be used to verify the authentication token |
CredentialId | Number | ID of the credential to be used from the credentials section |
Variable | Type | Description |
CredentialId | Number | Matching ID from authentication section |
Type | Number | Type of FTP to use: 1 (FTP), 2 (FTPS), 3 (SFTP) |
Host | String | FTP path |
Port | Number | Port to be used |
Domain | String | Computer/Server name |
Username | String | Username for FTP |
Password | String | Password for FTP |
Root | String | root section of the URL path |
RootVirtualPath | String | Full URL of the virtual path |
CertificatePath | String | If certificate is being used then enter here |
SupportedFileTypes | String | String storing the extensions for the accepted file types, separated by comma |