jiangping
2025-04-23 eff9f8dce083c7ef911cb8419c03baf3af176c68
server/src/main/java/com/doumee/api/common/PublicCloudController.java
@@ -4,6 +4,8 @@
import com.alibaba.fastjson.JSONObject;
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.config.annotation.EncryptionReq;
import com.doumee.config.annotation.EncryptionResp;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.constants.Constants;
import com.doumee.core.constants.ResponseStatus;
@@ -99,6 +101,7 @@
                for (MultipartFile file :fileList) {
                    //获得每一个文件
                    String originname = file.getOriginalFilename();
                    log.error("【上传FTP成功】=============开始========="+index+"===="+originname);
                    InputStream is = file.getInputStream();
                    String endType = originname.substring(originname.lastIndexOf("."), originname.length());
                    String date = DateUtil.getNowShortDate();
@@ -118,6 +121,7 @@
                        fileJSON.put("originname", originname);
                        jsonArray.add(fileJSON);
                    }
                    log.error("【上传FTP成功】=============结束========="+index+"====="+r+"===="+fName);
                    index = index + 1;
                }
                context.put("data",jsonArray);
@@ -190,26 +194,7 @@
                        }
                        index = index + 1;
                    }
                }
//                while (it.hasNext()) {
//                    MultipartFile file = multipartRequest.getFile(it.next());
//                    String originname = file.getOriginalFilename();
//                    is = file.getInputStream();
//                    String endType = originname.substring(originname.lastIndexOf("."),originname.length());
//                    String date = DateUtil.getNowShortDate();
//                    String fName =  date+"/"+ UUID.randomUUID()+endType;
//                    String fileName = folder+"/"+fName;
//                    boolean r = ftp.uploadInputstream(is,fileName);
//                    if(r){
//                        JSONObject fileJSON = new JSONObject();
//                        fileJSON.put("url", prefixPath+fileName);
//                        fileJSON.put("imgaddr", fName);
//                        fileJSON.put("imgname", fileName);
//                        fileJSON.put("originname", originname);
//                        jsonArray.add(fileJSON);
//                    }
//                }
                context.put("data",jsonArray);
            }
        } catch (Exception e) {