|
|
@@ -92,16 +92,16 @@ public class FileController {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/refreshPath", method = RequestMethod.GET)
|
|
|
- public ModelMap refreshpath() throws IOException {
|
|
|
- ModelMap map = new ModelMap();
|
|
|
- List<Long> successIds = new ArrayList<Long>();
|
|
|
- List<Long> failedIds = new ArrayList<Long>();
|
|
|
- convertPath(successIds, failedIds);
|
|
|
- map.put("successIds", successIds);
|
|
|
- map.put("failedIds", failedIds);
|
|
|
- return map;
|
|
|
- }
|
|
|
+// @RequestMapping(value = "/refreshPath", method = RequestMethod.GET)
|
|
|
+// public ModelMap refreshpath() throws IOException {
|
|
|
+// ModelMap map = new ModelMap();
|
|
|
+// List<Long> successIds = new ArrayList<Long>();
|
|
|
+// List<Long> failedIds = new ArrayList<Long>();
|
|
|
+// convertPath(successIds, failedIds);
|
|
|
+// map.put("successIds", successIds);
|
|
|
+// map.put("failedIds", failedIds);
|
|
|
+// return map;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 递归更新所有附件信息
|
|
|
@@ -130,11 +130,6 @@ public class FileController {
|
|
|
}
|
|
|
in.close();
|
|
|
path = fileClient.upload(outStream.toByteArray(), attach.getSize(), name, null);
|
|
|
-// FileUploadHttp.Response response = FileUploadHttp.upload(null, filePath, null);
|
|
|
-// if (response.getStatusCode() == 200) {
|
|
|
-// JSONObject obj = JSONObject.parseObject(response.getResponseText());
|
|
|
-// if(obj.get("path").toString() != null) path = obj.get("path").toString();
|
|
|
-// }
|
|
|
} catch (IOException e) {
|
|
|
failedIds.add(attach.getId());
|
|
|
} catch (Exception e) {
|
|
|
@@ -178,7 +173,6 @@ public class FileController {
|
|
|
in.close();
|
|
|
byte[] imgByte = output.toByteArray();
|
|
|
path = fileClient.upload(imgByte, 373760, "jpg", null);
|
|
|
-// return URLDecoder.decode(Base64.toBase64String(imgByte), "UTF-8");
|
|
|
return path;
|
|
|
}
|
|
|
|