Jump to content

SQL User Import - not pulling the image through


Recommended Posts

Hi All,

We are having some issues with trying to import images.  In the SQL user import script I have the following, however this does not pull the image and I get an error.  Please see below.

 

    , "Image":{
        "Action":"Both"
        , "UploadType": "URI"
        , "InsecureSkipVerify": false
        , "ImageType": "jpg"
        , "URI": "\\\\fileshare\\folder1\\folder2\\{{.emailaddress}}.jpg"
    }

 

Unable to get image URI: \\fileshare\folder1\folder2\emailaddress.jpg (500) [Get "%5C%5Cfileshare%5Cfolder1%5Cfolder2%5Cemailaddress.jpg": unsupported protocol scheme ""]

Any ideas why I get this error please.

 

Kind Regards,

 

Salma

Link to comment
Share on other sites

The wiki states for the Upload Type parameter:

"UploadType": "URL" /* options : URI/URL ; local (network) drive or HTTP(S) served image */

but the URI you provide is a UNC path, which is not the same thing.

If you map the Fileshare to a local drive letter does that allow you to download the image?

Alternatively, the File URI scheme may work, so something like:

"URI": "file:\\\\fileshare\\folder1\\folder2\\{{.emailaddress}}.jpg"

 

Link to comment
Share on other sites

@Steve Giller I have tried to map the UNC path to a local drive and can confirm that I access the file through the local path but not through the json file. I have tried to add the suggestion that you have entered but that has not worked either.

Anything else you can suggest? Thank you for your help.

 

Kind Regards,

 

Salma

 

Link to comment
Share on other sites

@Steve Giller yes I did try your your example but it did not even run the json file, I had to escape the slashes like the example below:

"URI" : "Q:\\folder1\\folder2\\{{.emailaddress}}.jpg"

None of the below have worked.

"URI": "Q:\folder1\folder2\{{.emailaddress}}.jpg"

      "URI": "Q:\\folder1\\folder2\\{{.emailaddress}}.jpg"

      "URI": "file:\\\\Q:\\folder1\\folder2\\{{.emailaddress}}.jpg"
 

The error message is as below:

2023/02/22 16:10:22 [DEBUG] Image Lookup URI: file:\\Q:\folder1\folder2\emailaddress.jpg
2023/02/22 16:10:22 [ERROR] Unable to get image URI: file:\\Q:\folder1\folder2\emailaddress.jpg (500) [Get "file:\\\\Q:\\folder1\\folder2\\emailaddress.jpg": unsupported protocol scheme "file"]
 

Kind Regards,

 

Salma

 

 

 

 

Link to comment
Share on other sites

@Salma Sarwar The latest version has just been released, this now caters for local files on a network share, e.g.

, "Image":{
     "Action":"Both"
     , "UploadType": "LOCAL"
     , "InsecureSkipVerify": false
     , "ImageType": "jpg"
     , "URI": "\\\\server\\folder1\\folder2\\{{.emailaddress}}.jpg"
   }

The Wiki has been updated, with the new UploadType of "LOCAL"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...