Salma Sarwar Posted February 21, 2023 Share Posted February 21, 2023 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 More sharing options...
Steve Giller Posted February 21, 2023 Share Posted February 21, 2023 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 More sharing options...
Salma Sarwar Posted February 22, 2023 Author Share Posted February 22, 2023 @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 More sharing options...
Steve Giller Posted February 22, 2023 Share Posted February 22, 2023 58 minutes ago, Salma Sarwar said: I have tried to map the UNC path to a local drive and can confirm that I access the file through the local path Did you change the JSON to use the mapped drive? For example: "URI": "Q:\folder1\folder2\{{.emailaddress}}.jpg" Link to comment Share on other sites More sharing options...
Salma Sarwar Posted February 22, 2023 Author Share Posted February 22, 2023 @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 More sharing options...
Steve Giller Posted February 22, 2023 Share Posted February 22, 2023 Having checked with the Developers I have to report that currently the SQL User Import does not support local files for the image. However we are investigating if this can be provided, and will update this thread shortly. Link to comment Share on other sites More sharing options...
Salma Sarwar Posted February 23, 2023 Author Share Posted February 23, 2023 @Steve Giller any updates regarding this. Link to comment Share on other sites More sharing options...
Steve Giller Posted February 23, 2023 Share Posted February 23, 2023 @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 More sharing options...
Salma Sarwar Posted February 28, 2023 Author Share Posted February 28, 2023 @Steve Giller thank you so much sorry been on away from the office so did not get a chance to reply. I will get the new version downloaded today. Kind Regards, Salma 1 Link to comment Share on other sites More sharing options...
Salma Sarwar Posted February 28, 2023 Author Share Posted February 28, 2023 @Steve Giller tried your suggestion as above and I have got the following error, any ideas why I might be getting this? 2023/02/28 16:20:04 [ERROR] Unsuccesful Decoding: encoding/hex: invalid byte: U+0068 'h' Thank you for your help. Kind Regards, Salma Link to comment Share on other sites More sharing options...
Salma Sarwar Posted March 1, 2023 Author Share Posted March 1, 2023 @Steve Giller any updates or suggestions on my error please? Kind Regards, Salma Link to comment Share on other sites More sharing options...
Steve Giller Posted March 1, 2023 Share Posted March 1, 2023 @Salma Sarwar Aside from what it says - that there's an invalid character in the data - I don't have anything more to offer, I'm afraid. Link to comment Share on other sites More sharing options...
Salma Sarwar Posted March 2, 2023 Author Share Posted March 2, 2023 @Steve Giller thank you for your help. I will raise a support call. Kind Regards, Salma Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now