Skip to content

Commit

Permalink
Merge pull request #6264 from thienvc/patch-1
Browse files Browse the repository at this point in the history
Fixed a thumbnail issue for sites not in standard path
  • Loading branch information
bdukes authored Dec 11, 2024
2 parents f5374f3 + 9f38f8d commit 63c2887
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ internal static string CreateThumbnail(string strImage)
var imageFileName = Path.GetFileName(strImage);
if (string.IsNullOrEmpty(imageFileName) || imageFileName.StartsWith("thumbnail_"))
{
strImage = Globals.ApplicationPath + "/" + strImage.Substring(strImage.IndexOf("portals\\"));
strImage = strImage.Substring(Globals.ApplicationMapPath.Length);
strImage = strImage.Replace("\\", "/");
return strImage;
}
Expand Down Expand Up @@ -439,7 +439,7 @@ internal static string CreateThumbnail(string strImage)
}
}

strThumbnail = Globals.ApplicationPath + "/" + strThumbnail.Substring(strThumbnail.IndexOf("portals\\"));
strThumbnail = strThumbnail.Substring(Globals.ApplicationMapPath.Length);
strThumbnail = strThumbnail.Replace("\\", "/");

// return thumbnail filename
Expand Down

0 comments on commit 63c2887

Please sign in to comment.