Hi When i try to upload excel product import. Sometime it doesn't add entry in [Product_Picture_Mapping] database ? So i am loosing pictures for some products ?
But if i add picture from product edit from Admin. It work's. But i can't do one by one for more than 1000 products.
Do the pictures that are missing have any special characteristic I.e are they bigger ? Have different security ?
I have found sometimes images have an internal problem and will not upload via admin If you can work out which product has the problem you try to re-import just these products
Hi Yidna, I have upload 1838 products but upload only 1335 images i can see 1335 records in picture mapping table. i can see 1838 records In picture table i can see 1838 records in picture binary table.
All my image file start with number format and end with number format like 1245245.jpg No idea what happen.
I've been struggling with this issue as well and I think it's caused by a .NET bug. https://github.com/dotnet/runtime/issues/21626 The Uri.IsWellFormedUriString function sometimes returns a false negative depending on the characters in the URI. 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;
Hi, Linden. We analyzed the problem and your solution, unfortunately this is really a problem in .Net, but your solution is not very suitable, since it actually disables the check completely. For example, your code will accept such a string as a valid address: "this is not a valid URL adress://tes.jpg"
Linden wrote:
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;