浏览代码

代码提交

chenweida 8 年之前
父节点
当前提交
bb4adaa1f0
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java

+ 3 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java

@ -65,8 +65,8 @@ public class FileUploadController extends BaseController {
				fileName = mf.getOriginalFilename();
				String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
				// 重命名文件
				firstPhoto=photo.substring(0,photo.lastIndexOf("."))+"_small."+fileExt;
				File uploadFile = new File(firstPhoto);
				firstPhoto=photo.substring(0, photo.lastIndexOf("."))+"_small."+fileExt;
				File uploadFile = new File(SystemConf.getInstance().getImagePath() + File.separator+firstPhoto);
				// 拷贝文件流到指定文件路径
				FileCopyUtils.copy(mf.getBytes(), uploadFile);
				// 生成缩略图
@ -75,7 +75,7 @@ public class FileUploadController extends BaseController {
				//images.add(uploadFile);
				//tempPaths.add(datePath + newFileName);
			}
			String urls = firstPhoto;
			String urls = SystemConf.getInstance().getImageServer()+firstPhoto;
			JSONObject json = new JSONObject();
			json.put("status", 200);
			json.put("msg", "上传成功");