Commit 48b30fd0 authored by shiyu's avatar shiyu

上传文件

parent a6fa0b31
......@@ -66,15 +66,15 @@ public class QdUserSignInController {
} else {
targetInput = file.getInputStream();
}
String url = storageService.store(targetInput, file.getSize(), file.getContentType(), originalFilename);
Map<String, Object> map = new HashMap<>();
map.put("url", url);
logger.info("【请求结束】乾岛上传文件,响应结果:{}", JSONObject.toJSONString(map));
return Result.success(map);
} catch (Exception e) {
logger.error("get image size failed : ", e);
}
String url = storageService.store(targetInput, file.getSize(), file.getContentType(), originalFilename);
Map<String, Object> data = new HashMap<>();
data.put("url", url);
logger.info("【请求结束】乾岛上传文件,响应结果:{}", JSONObject.toJSONString(data));
return ResponseUtil.ok(data);
return Result.failed();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment