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

修改代码

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