企业库
This commit is contained in:
parent
92693f4995
commit
4eef37d7ef
|
|
@ -96,7 +96,7 @@ public class CommonUploadService {
|
|||
if(StringUtils.isEmpty(uploadResult)){
|
||||
return AjaxResult.error(Constants.UPLOAD_ERROR);
|
||||
}
|
||||
map.put("fileRes", FileUtil.getFileInfo(file,uploadPath));
|
||||
map.put("fileRes", FileUtil.getFileInfo(file,uploadPath,jsonObj.getString("fileUploadType")));
|
||||
return AjaxResult.success(Constants.UPLOAD_SUCCESS,map);
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ public class CommonUploadService {
|
|||
log.error(e.toString(),e.getMessage());
|
||||
return AjaxResult.error(Constants.UPLOAD_ERROR);
|
||||
}
|
||||
map.put("fileRes", FileUtil.getFileInfo(file,uploadPath));
|
||||
map.put("fileRes", FileUtil.getFileInfo(file,uploadPath,jsonObj.getString("fileUploadType")));
|
||||
map.put("ocrResult", ocrResponse);
|
||||
return AjaxResult.success(Constants.UPLOAD_SUCCESS,map);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class FileUtil {
|
|||
* @author cwchen
|
||||
* @date 2025/10/22 15:37
|
||||
*/
|
||||
public static Map<String, Object> getFileInfo(MultipartFile file,String path) {
|
||||
public static Map<String, Object> getFileInfo(MultipartFile file,String path,String fileUploadType) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("filePath", path);
|
||||
map.put("sourceFileName", file.getOriginalFilename());
|
||||
|
|
@ -121,6 +121,7 @@ public class FileUtil {
|
|||
map.put("suffixName", getFileExtension(file.getOriginalFilename()));
|
||||
map.put("fileSize", getFileSizeInMB(file));
|
||||
map.put("fileType", isImageFile(file.getOriginalFilename()) ? "1":"2");
|
||||
map.put("businessType", fileUploadType);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue