Forcefield: Bulk Importing User Images
Introduction
This bulletin describes the process of adding user images into Forcefield from a third-party system.
Important!
This operation should only be conducted by a trained Forcefield technician or operator. This procedure involves using the QNX shell to run commands. running incorrect commands or not understanding the commands could lead to major problems, such as deleting important system files and rendering your Forcefield system inoperable.
Please contact Technical Support should you have any concerns.
Before you begin, please perform a full backup of your Forcefield system.
Summary
- Export a user list from Forcefield
- Use a third-party personnel management system to produce the numbered images.
- Format the images in the specified folder format.
- Copy these folders onto a Samba shared drive.
- Copy these folders into the specified Forcefield folder.
Generate a User Report
First, we need a list of users and their Forcefield user numbers. This can be generated from the "Users > Reports > Card(user) Reports" menu in Forcefield. Export as a 'Summary C.S.V'.
This list of users needs to be married up to a similar list of users and photos from the personnel management system in use on your site. There are many different systems to manage people and photos, and as such Technical Support is limited in assisting with the integration of third party systems.
Generate Images
The format that Forcefield requires is based on the Forcefield user number. To successfully import user images, the images must be in the following format:
- #.jpg
Where # is the user number without leading zeroes. The format of the image must be a JPEG, with the extension of ".jpg" (note the lower-case extension).
For example:
Forcefield User Number | User Name | Image File Required |
12 | Fred Flintstone | 12.jpg |
3092 | Barney Rubble | 3092.jpg |
23941 | George Jetson | 23941.jpg |
The recommended size is 550px (h) x 400px (w).
Sorting the Images into Folders
Now you should have a large collection of users photos with the name of the file being the user number. In order for Forcefield to find these, they must be arranged into sub-folders, with each sub-folder containing 1000 users. The folder format is as follows:
Where;
- Folder named "0" contains user images 1.jpg to 999.jpg,
- Folder named "1" contains user images 1000.jpg to 1999.jpg,
- Folder named "3" contains user images 3000.jpg to 3999.jpg,
- Folder named "23" contains user images 23000.jpg to 23999.jpg.
Simply, the folder name is the range of cards in thousands.
Now that these are sorted, place these folders into a folder in your shared folder called "cardphotos". Your images will now be formatted like so:
Forcefield User Number | User Name | Image Path |
12 | Fred Flintstone | \\share\sharedfolder\cardphotos\0\12.jpg |
3092 | Barney Rubble | \\share\sharedfolder\cardphotos\3\3092.jpg |
23941 | George Jetson | \\share\sharedfolder\cardphotos\23\23941.jpg |
Copying to Forcefield
In Forcefield, open the "Databases > Computer Equipment > Storage > Samba (CIFS)" window. Select the CIFS ID of the shared folder you wish to use and click Save. You will be prompted to test the connection, select Yes. The following dialog box will be displayed:
Do NOT click continue. Leave this dialog box open.
Now open a QNX Shell. Type "su" and enter your root password.
At the prompt, type the following command: cp -R -v /smb1/cardphotos /usr/ares/user/image/
This will copy all the user images and their folders into the relevant Forcefield folder. No further action is required, photos will now appear in the User Maintenance screen for all users with photos.