Commit 0b7f3ed9 authored by 周健威's avatar 周健威

修改代码

parent a3a6ce42
...@@ -676,29 +676,26 @@ public class GtDataRestClient { ...@@ -676,29 +676,26 @@ public class GtDataRestClient {
} }
// /** /**
// * *
// * Description:显示指定路径[文件/文件夹(包括子文件)]的属性 * Description:显示指定路径[文件/文件夹(包括子文件)]的属性
// * *
// * @param path * @param path
// * @param username * @return
// * @param recursive * 成功({key:HttpStatusCode,value:200},{key:files,value:List<GtdataFile
// * @param sign * >})
// * @param time *
// * @return */
// * 成功({key:HttpStatusCode,value:200},{key:files,value:List<GtdataFile public Map<String, Object> showFileInfo(String path) {
// * >}) //路径 和 文件分离
// * // Integer indexNum = StrUtil.lastIndexOfIgnoreCase(path, "/");
// */ // String fpath = path.substring(0, indexNum);
// public Map<String, Object> showFileInfo(String path) { // String filename = path.substring(indexNum, path.length());
// //路径 和 文件分离 String resourceUrl = MessageFormat.format(
// String[] = StrUtil. "{0}{1}?op=LIST&sign={2}&time={3}",
// String fin gtDataUrl, path, defaultSign, defaultTime);
// String resourceUrl = MessageFormat.format( return restGet(resourceUrl);
// "{0}{1}?op=LIST&sign={2}&time={3}", }
// gtDataUrl, path, defaultSign, defaultTime);
// Map<String, Object> responseMap = restGet(resourceUrl);
// }
/** /**
* *
......
...@@ -34,6 +34,14 @@ public class BgGtdataController extends CommonBaseController { ...@@ -34,6 +34,14 @@ public class BgGtdataController extends CommonBaseController {
public static final String uploadP = "/rscloudmart/bg/upload/"; public static final String uploadP = "/rscloudmart/bg/upload/";
@RequestMapping(value = "/upload", method = RequestMethod.POST)
public ObjectRestResponse uploads2(
@RequestParam("file") MultipartFile file,
@RequestParam(value = "prefix",defaultValue = "admin")String prefix
)throws Exception {
return uploads2(file, prefix);
}
@RequestMapping(value = "/app/unauth/upload", method = RequestMethod.POST) @RequestMapping(value = "/app/unauth/upload", method = RequestMethod.POST)
@IgnoreUserToken @IgnoreUserToken
public ObjectRestResponse uploads( public ObjectRestResponse uploads(
...@@ -57,8 +65,8 @@ public class BgGtdataController extends CommonBaseController { ...@@ -57,8 +65,8 @@ public class BgGtdataController extends CommonBaseController {
} }
gtDataRestClient.createMultipartFile(file, fileName); gtDataRestClient.createMultipartFile(file, fileName);
//获取文件信息 //获取文件信息
Map<String, Object> map = gtDataRestClient.open(fileName); Map<String, Object> map = gtDataRestClient.showFileInfo(fileName);
return ObjectRestResponse.succ(fileName); return ObjectRestResponse.succ(map);
} }
public void downloadVideoById(String fileName, String filePath, HttpServletResponse response) throws Exception { public void downloadVideoById(String fileName, String filePath, HttpServletResponse response) throws Exception {
......
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