在picture library中取某一图片的大图、小图
public static string GetPicThumbnail(SPFile file, string type)
{
string thumbnail = "";
string folderUrl = file.ParentFolder.ServerRelativeUrl;
string fileName = file.Name;
int expIndex = fileName.LastIndexOf('.');
string subName = fileName.Substring(0, expIndex) + "_" + fileName.Substring(expIndex + 1) + ".jpg";
if (type == "small")
{
thumbnail = folderUrl + "/_t/" + subName;//这是拿小图的;
}
else if (type == "big")
{
thumbnail = folderUrl + "/_w/" + subName;//这是拿大图的;
}
return thumbnail;
}