Compare commits

...

2 Commits

@ -419,7 +419,7 @@ public class AppController extends BaseController
tImage.setThirdId(recordId);
tImage.setCreateTime(new Date());
tImage.setName(name);
String path=GenerateImage(value);
String path=GenerateImage(value,name);
tImage.setPath(path);
imageService.insertTImage(tImage);
}
@ -465,7 +465,7 @@ public class AppController extends BaseController
{
String imageKey=keys[i];
String imgStr=parents.get(i).getJSONObject(imageKey).getString("v");
String path=GenerateImage(imgStr);
String path=GenerateImage(imgStr,imageKey);
parents.get(i).getJSONObject(keys[i]).put("v",null);
TImage tImage = new TImage();
tImage.setName(imageKey);
@ -495,7 +495,7 @@ public class AppController extends BaseController
}
public static String GenerateImage(String imgStr)
public static String GenerateImage(String imgStr,String imageName)
{
BASE64Decoder decoder = new BASE64Decoder();
@ -515,7 +515,7 @@ public class AppController extends BaseController
}
catch (Exception e)
{
throw new ServiceException("Base64转图片错误");
throw new ServiceException(imageName + " :Base64转图片错误");
}
}
}

@ -23,7 +23,7 @@ import com.ruoyi.framework.config.ServerConfig;
/**
*
*
*
* @author ruoyi
*/
@RestController
@ -39,7 +39,7 @@ public class CommonController
/**
*
*
*
* @param fileName
* @param delete
*/
@ -77,6 +77,9 @@ public class CommonController
{
try
{
if(file == null){
return AjaxResult.error("上传文件为空");
}
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称

Loading…
Cancel
Save