Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f78b010f
authored
2025-08-10 18:29:39 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
0877b00a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
lego-oss/src/main/java/com/lego/oss/core/OssClient.java
lego-oss/src/main/java/com/lego/oss/core/OssClient.java
View file @
f78b010
...
...
@@ -22,6 +22,7 @@ import com.lego.oss.enumd.AccessPolicyType;
import
com.lego.oss.enumd.PolicyType
;
import
com.lego.oss.exception.OssException
;
import
com.lego.oss.properties.OssProperties
;
import
lombok.extern.slf4j.Slf4j
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
...
...
@@ -35,6 +36,7 @@ import java.util.Date;
*
* @author Lion Li
*/
@Slf4j
public
class
OssClient
{
private
final
String
configKey
;
...
...
@@ -161,7 +163,8 @@ public class OssClient {
}
public
InputStream
getObjectContent
(
String
path
)
{
path
=
path
.
replace
(
getUrl
()
+
"/"
,
""
);
log
.
info
(
"=====getUrl()=="
+
getUrl
());
path
=
path
.
replace
(
"http://127.0.0.1:9000"
+
"/"
,
""
);
S3Object
object
=
client
.
getObject
(
properties
.
getBucketName
(),
path
);
return
object
.
getObjectContent
();
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment