You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Uri.IsWellFormedUriString function sometimes returns a false negative depending on the characters in the URI (see dotnet/runtime#21626). In my case some image file names had the ^ character in it.
The workaround I am using is to url encode the image string before checking if it is a valid uri. I also had to change uri kind from Absolute to RelativeOrAbsolute for it to work.
In the Nop.Services/ExportImport/ImportManager.cs file I changed the function DownloadFile as follows:
Before:
if (!Uri.IsWellFormedUriString(urlString, UriKind.Absolute))
return urlString;
After:
var encodedUrl = System.Web.HttpUtility.UrlEncode(urlString);
if (!Uri.IsWellFormedUriString(encodedUrl, UriKind.RelativeOrAbsolute))
return urlString;
nopCommerce version: 4.30
Source: https://www.nopcommerce.com/boards/topic/79591/product_picture_mapping-issue#280288
The text was updated successfully, but these errors were encountered: