|
@ -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);
|
|
}
|
|
}
|