Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
ldp-docs
Project
Project
Details
Activity
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
doc
ldp-docs
Commits
9afd9cc4
Commit
9afd9cc4
authored
Nov 17, 2021
by
郭人方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs:修改第三方对象存储服务说明,添加桶参数。
parent
ace2760f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
1 deletion
+59
-1
LDP第三方对象存储服务使用说明.md
开发文档/LDP第三方对象存储服务使用说明.md
+59
-1
No files found.
开发文档/LDP第三方对象存储服务使用说明.md
View file @
9afd9cc4
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
### 2.3 服务调用
### 2.3 服务调用
`StorageService`
有
三
个上传接口,分别是:
`StorageService`
有
六
个上传接口,分别是:
```
java
```
java
/**
/**
...
@@ -59,8 +59,66 @@
...
@@ -59,8 +59,66 @@
* @throws Exception
* @throws Exception
*/
*/
String
upload
(
File
file
,
String
fileName
)
throws
Exception
;
String
upload
(
File
file
,
String
fileName
)
throws
Exception
;
// 以下3个是添加桶参数上传接口
/**
* 上传文件到云存储, 返回图片HTTP地址
*
* @param data 字节数据
* @param fileName 云存储文件路径
* @param bucket 桶
* @return 图片HTTP地址
* @throws Exception
*/
String
upload
(
byte
[]
data
,
String
fileName
,
String
bucket
)
throws
Exception
;
/**
* 上传文件到云存储, 返回图片HTTP地址
*
* @param inputStream 字节流
* @param fileName 云存储文件路径
* @param bucket 桶
* @return 图片HTTP地址
* @throws Exception
*/
String
upload
(
InputStream
inputStream
,
String
fileName
,
String
bucket
)
throws
Exception
;
/**
* 上传文件到云存储, 返回图片HTTP地址
*
* @param file 文件
* @param fileName 云存储文件路径
* @param bucket 桶
* @return 图片HTTP地址
* @throws Exception
*/
String
upload
(
File
file
,
String
fileName
,
String
bucket
)
throws
Exception
;
```
```
`StorageService`
有两个下载接口,分别是:
```
java
/**
* 文件下载读取二进制流数据
*
* @param fileName 文件URL
* @return
* @throws Exception
*/
byte
[]
download
(
String
fileName
)
throws
Exception
;
/**
* 文件下载读取二进制流数据,添加桶参数
*
* @param fileName 文件URL
* @param bucket 桶
* @return
* @throws Exception
*/
byte
[]
download
(
String
fileName
,
String
bucket
)
throws
Exception
;
```
样例工程中使用的是byte
[]
,以下是样例代码:
样例工程中使用的是byte
[]
,以下是样例代码:
```
java
```
java
...
...
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