cloudcard-photo-downloader

CloudCard Photo Downloader

(cloudcard-photo-downloader)


Summary

This project automatically downloads photos from CloudCard Online Photo Submission.

Tutorial Videos

Tutorial Videos

Requirements

To test your system, run java -version. The output should look like the following. The exact version isn’t important as long as it starts with 17.

openjdk version "17.0.6" 2023-01-17 LTS
OpenJDK Runtime Environment Corretto-17.0.6.10.1 (build 17.0.6+10-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.6.10.1 (build 17.0.6+10-LTS, mixed mode, sharing)

Network Diagram

Network Diaram

Installation and Configuration

  1. Create a separate service account for CloudCard Photo Downloader to use. (Instructions)
  2. Download the zip file.
  3. Get your access token (Instructions are included in the service account video.) 1.

Configure application.properties (Instructions)

  1. Open a terminal/command prompt and navigate to the cloudcard-photo-downloader directory.
  2. Run run (Windows) or ./run.sh (Linux/Mac).
  3. Check the file downloader.log for output from the downloader.
  4. Recommended: Set up the command to run as a service that starts automatically when the server starts. The process for doing this is dependent on your operating system and is outside the scope of these instructions.

Troubleshooting

Immediately upon startup you get the following error:

com.cloudcard.photoDownloader.ApplicationPropertiesException: The CloudCard API access token must be specified. Please update the 'application.properties' file.
  1. Make sure the application.properties is in the same directory.
  2. Make sure the application.properties is not named application.properties.txt.
  3. As a workaround, You can also specify config values without an application.properties file using the following syntax
    1. java -Dconfig.key=config.value -jar cloudcard-photo-downloader.jar
    2. For example: java -Dcloudcard.api.accessToken=abc123 -jar cloudcard-photo-downloader.jar

Configuration

The simplest way to configure the application is by creating an application.properties file, which should be saved in the same directory as the downloader. There are, however, many other strategies for configuring the application. For example you may configure the settings using environment variables, JVM variables, etc. See the Spring Boot Documentation for more information on those options.

Below are descriptions of each option:

General Settings (Video)

SqsPhotoService Settings

CloudCardPhotoService Settings

Proxy Settings

The downloader supports going through a proxy when using the CloudCardPhotoService to download photos to the file system.

Shell/Batch Script Hook Settings (Video)

FileStorageService Settings (Video)

Note: downloader.storageService must be set to FileStorageService for these to have any effect.

DatabaseStorageService Settings (Video)

Note: downloader.storageService must be set to DatabaseStorageService for these to have any effect.

Database Connection Settings (Video)

TouchNet Storage Service Settings

Note: downloader.storageService must be set to TouchNetStorageService for these to have any effect.

File Name Resolver Settings

DatabaseFileNameResolver Settings

CustomFieldFileNameResolver Settings

Pre-Processor Settings

Each photo is processed and potentially modified by the specified pre-processor after it is retrieved from CloudCard and before it is saved by the storage service

BytesLinkPreProcessor Settings

Post-Processor Settings

Each downloaded photo is processed and potentially modified by the specified post-processor after it is saved by the storage service and before it marked as downloaded in CloudCard

DatabasePostProcessor Settings

AdditionalPhotoPostProcessor Settings

Summary Service Settings (Video)

Remote Logging Settings

If you would like to send logs to CloudCard for remote support, you can specify the following config properties. This behavior is optional and off by default.

ManifestFileService

The ManifestFileService allows you to generate a file with information about each photo that has been downloaded. This service runs each time the downloader successfully downloads photos.

CSVManifestFileService Settings

The CSVManifestFileService is responsible for generating a CSV file containing information about each photo that has been downloaded. This service runs each time the downloader successfully downloads photos. Below are the settings you can configure for CSVManifestFileService:

Encrypting application properties (Video)

-This method uses AES-256 to encrypt the run.sh file and any application properties that it contains

  1. Download encode-run-sh.sh and decrypt-and-execute-run-sh.sh from the Scripts folder in this repository and add them to your downloader folder
  2. Add any properties you want to encrypt (such as the access_token) to run.sh as command line parameters instead of in application.properties
  3. Run encode-run-sh.sh and create a password
  4. Delete your un-encrypted run.sh file
  5. To run the downloader, run decrypt-and-execute-run-sh.sh. This will ask for your password and then execute the encrypted file, which runs the downloader.

Warranty

THIS PROJECT IS DISTRIBUTED WITH NO WARRANTY. SEE THE LICENSE FOR FULL DETAILS.
If your organization needs fully warrantied CloudCard integration software, consider Cloud Photo Connect from Vision Database Systems.

Support

THIS PROJECT IS DISTRIBUTED WITHOUT ANY GUARANTEE OF SUPPORT FROM THE AUTHOR(S). SEE LICENSE FOR FULL DETAILS.
Separate support agreements are available, contact info@OnlinePhotoSubmission.com for more details.