|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(value = "/upload", headers = "content-type=multipart/form-data") | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | public void upload(HttpServletRequest request, HttpServletResponse response, String folder) throws Exception { | 
|---|
|  |  |  | public void upload(HttpServletRequest request, HttpServletResponse response, String folder,String flag) throws Exception { | 
|---|
|  |  |  | Date d1 = new Date(); | 
|---|
|  |  |  | log.error("总得上传文件成功=============开始========="+DateUtil.getPlusTime2(d1)); | 
|---|
|  |  |  | if(Objects.isNull(folder)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | fileJSON.put("imgaddr", fName); | 
|---|
|  |  |  | fileJSON.put("imgname", fileName); | 
|---|
|  |  |  | fileJSON.put("originname", originname); | 
|---|
|  |  |  | fileJSON.put("flag", flag); | 
|---|
|  |  |  | context.put("data",fileJSON); | 
|---|
|  |  |  | context.put("message","请求成功"); | 
|---|
|  |  |  | writerJson(response, context); | 
|---|