更改后代码
//imgFile.SaveAs(filePath);
String fileUrl = saveUrl + Common.ImageHelper.SaveThumbnailByOriginal(imgFile, dirPath, 300);
Hashtable hash = new Hashtable();
更改前代码
imgFile.SaveAs(filePath);
String fileUrl = saveUrl + newFileName;
其中 Common.ImageHelper.SaveThumbnailByOriginal 这个是自己写的一个图片处理方法。