Setup for Product Images

 

Content was last updated in 06.23.03-00

Revision History

 

Imagefeed is a utility provided by UBS that can be scheduled to run periodically on Windows Task Scheduler.

This reads a .CSV file and corresponding Image files mentioned in the .CSV file from the SFTP server and load them on to the respective product present on the R2 DB.

You should follow the below steps to set it up:

 

Servers Required

  1. SFTP Server: Location where the CSV file and Image files are kept.

  2. Application Server: The source from where the Task Scheduler is scheduled to run.

  3. R2 Database Server: The central location to where the Image files downloaded from SFTP will be placed by the Imagefeed utility.

This is required because the utility eventually uses the ItemImage data conversion to upload the images, and that requires the images must be on DB Server.

 

Database Server setup

  1. Create a Folder in Database Server and Map Network Drive to this folder with Application Server for the User with whose credentials you will be scheduling to run the Imagefeed Batch file.

Table 1.0: Steps to create the folders

When using Linux

When using Windows

Run the following commands:

$ cd /F

$ sudo mkdir UBS

$ sudo mkdir R2images

Enable 'Execute' permission on this folder to everyone.

$ sudo chmod +x R2images

Create a folder 'R2Images' in Windows Drive, and then Right-click on it.

Go to Properties > Sharing (tab) > Advanced Sharing. Select 'Share this folder'.

Go to Permissions and Add the user or group whom you want to share.

Modify the Permission such as Full/Change/Read etc. Click on Apply and OK.

 

  1. Folder should be accessible from App server with Read and Write permission.

For Example:

Let's consider that P.Q.R.S is the IP Address of the Database server, and we have created a folder 'R2Images' at the path C:\UBS\ folder in Database server and network share the folder with Application server.

So, if from the application server, if you try access the path \\P.Q.R.S\R2Images, you should be able to open and view the images.

 

CSV File details

The .CSV file gives the details of the image file name, filepath and R2 product to which it has to be uploaded.

Below are expected fields on the CSV file:

In the .CSV file, for the second column 'DirectoryName' you need to mention the database server path what you created above in step 2.

'DirectoryName' will be same for all the records, since the Imagefeed utility eventually reads the images downloaded from SFTP server from this shared folder present on the Database server.

 

Setting Up SFTPConfig.ini

In the SFTPConfig.ini file, a new attribute imagepath to be mentioned which should have the actual network path on database server which is shared with application server as created in step 2.

For Example: imagepath =\\P.Q.R.S\R2Images

 

Task Scheduler setup

In General Tab, 'Do not store password' MUST be clear or not selected.

In General Tab, 'Run with highest privileges' should be selected.

This is required since through task scheduler we are copying the Image file to DB Server

 

Troubleshooting Guide:

  • When the Batch file scheduled on Windows Task Scheduler has wrong Schema details mentioned that leads to DB Connection failure, it fails to process the CSV files.

  • You may identify this error in the Task scheduler history for Action Competed Category, with return code as 4294967295

 

The maximum file-size accepted for an Image file is up to 16 mb.