|
@@ -578,9 +578,9 @@ namespace OASystem.API.Controllers
|
|
|
System.IO.MemoryStream ms = new System.IO.MemoryStream(arr);//转换成无法调整大小的MemoryStream对象
|
|
|
bitmap = new System.Drawing.Bitmap(ms);//将MemoryStream对象转换成Bitmap对象
|
|
|
|
|
|
- var fileDir = AppSettingsHelper.Get("VisaProgressImageFtpPath");
|
|
|
+ var fileDir = AppSettingsHelper.Get("VisaProgressImageBasePath");
|
|
|
//文件名称
|
|
|
- filename = "VisaProgress_" + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + imgName + ".jpg";//所要保存的相对路径及名字
|
|
|
+ filename = "VisaProgress_" + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + imgName + ".png";//所要保存的相对路径及名字
|
|
|
//上传的文件的路径
|
|
|
string filePath = "";
|
|
|
if (!Directory.Exists(fileDir))
|
|
@@ -593,10 +593,10 @@ namespace OASystem.API.Controllers
|
|
|
//string url = HttpRuntime.AppDomainAppPath.ToString();
|
|
|
//string tmpRootDir = System.Web.HttpContext.Current.Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString()); //获取程序根目录
|
|
|
//string imagesurl2 = tmpRootDir + filename; //转换成绝对路径
|
|
|
- //bitmap.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);//保存到服务器路径
|
|
|
+ bitmap.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);//保存到服务器路径
|
|
|
//bitmap.Save(filePath + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);
|
|
|
//bitmap.Save(filePath + ".gif", System.Drawing.Imaging.ImageFormat.Gif);
|
|
|
- bitmap.Save(filePath + ".png", System.Drawing.Imaging.ImageFormat.Png);
|
|
|
+ //bitmap.Save(filePath, System.Drawing.Imaging.ImageFormat.Png);
|
|
|
ms.Close();//关闭当前流,并释放所有与之关联的资源
|
|
|
bitmap.Dispose();
|
|
|
}
|