浏览代码

文件上传修改

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

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

@ -52,7 +52,7 @@ public class FileUploadController extends BaseController {
                String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
                String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
                // 重命名文件
                // 重命名文件
                firstPhoto = photo.substring(0, photo.lastIndexOf(".")) + "_small." + fileExt;
                firstPhoto = photo.substring(0, photo.lastIndexOf(".")) + "_small." + fileExt;
                File uploadFile = new File(SystemConf.getInstance().getImagePath() + File.separator + firstPhoto);
                File uploadFile = new File(SystemConf.getInstance().getTempPath() + File.separator + firstPhoto);
                // 拷贝文件流到指定文件路径
                // 拷贝文件流到指定文件路径
                FileCopyUtils.copy(mf.getBytes(), uploadFile);
                FileCopyUtils.copy(mf.getBytes(), uploadFile);
            }
            }