Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
0b7f3ed9
Commit
0b7f3ed9
authored
Dec 30, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
a3a6ce42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
25 deletions
+30
-25
GtDataRestClient.java
.../java/com/upyuns/platform/rs/gtdata/GtDataRestClient.java
+20
-23
BgGtdataController.java
...form/rs/datacenter/rest/backstage/BgGtdataController.java
+10
-2
No files found.
ace-common/src/main/java/com/upyuns/platform/rs/gtdata/GtDataRestClient.java
View file @
0b7f3ed9
...
...
@@ -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
);
}
/**
*
...
...
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/backstage/BgGtdataController.java
View file @
0b7f3ed9
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment