From 1efe2e6c8f21ca6ea8bb1283a07670cdd1ae8cf6 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 17 十一月 2022 20:07:47 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/service/all/CommonsFileuploadService.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java b/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java index c23f45c..540c25c 100644 --- a/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java +++ b/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java @@ -32,10 +32,10 @@ private final static Log log = LogFactory.getLog(CommonsFileuploadService.class); - public Object fileUpload(UserEntity ue, HttpServletRequest req, HttpServletResponse res) throws Exception { + public Object fileUpload(HttpServletRequest req, HttpServletResponse res) throws Exception { List<FileItem> items = getFileItem(req, res); - return copeFileItems(ue, items, req); + return copeFileItems(items, req); } /** @@ -70,11 +70,11 @@ /** * 澶勭悊瑙f瀽鍐呭锛氬鐞嗘櫘閫氳〃鍗曞煙鍜屾枃浠惰〃鍗曞煙 */ - private Object copeFileItems(UserEntity ue, List<FileItem> items, HttpServletRequest req) throws Exception { + private Object copeFileItems(List<FileItem> items, HttpServletRequest req) throws Exception { Map<String, String> map = new HashMap<String, String>(3); List<FileInfoEntity> list = new ArrayList<FileInfoEntity>(); - String path = pathHelper.getTempPath(ue.getId()); + String path = pathHelper.getTempPath(); for (FileItem item : items) { if (item.isFormField()) { String key = item.getFieldName(); @@ -109,7 +109,7 @@ return fi; } catch (Exception ex) { - log.error(ex.getStackTrace()); + log.error(ex.getMessage(), ex); return null; } } -- Gitblit v1.9.3