惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

MinIO

[求助] Minio 通过 nginx 配置代理访问出错 - V2EX minio 不支持缩减硬盘个数吗 - V2EX 只能付费才能用 mc support? - V2EX 关于 minio 的部署问题 - V2EX 有人生产使用 minio 吗 - V2EX minio 单磁盘部署的一些疑惑 - V2EX minio 这个对象存储有那些公司在用 - V2EX 各位 v2 的大神,有 minio 的不用登录的 web 浏览界面吗? - V2EX minio 如何访问之前已存在的文件? - V2EX 大家有生产环境使用 minio 的经验分享不? - V2EX 为什么在 Minio Cloud Storage 里使用排序时会失效? - V2EX
使用 minio 当作网站后端文件存储的一些疑问 - V2EX
ttxshang · 2019-03-31 · via MinIO

5 楼的代码有点问题,参数不能拼接在 path 后面,而是
appendRawQueryParameter("name","value")
下面具体代码
使用的 sdk 是

```
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</dependency>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.9.9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

```
###############

Aws4PresignerParams params = Aws4PresignerParams.builder()
// .expirationTime(storageTemplate.processExpires(expires))
.awsCredentials(storageTemplate.getCredentials())
.signingName("s3")
.expirationTime(Instant.now().plusSeconds(storageTemplate.getExpiresOrDefault(expires)))
.signingRegion(Region.of(storageTemplate.processRegion(region)))
.build();
SdkHttpFullRequest request = SdkHttpFullRequest.builder()
.encodedPath(storageTemplate.processPath(bucketName, key))
.host(storageTemplate.getHost())
.appendRawQueryParameter("uploadId", uploadId)
.appendRawQueryParameter("partNumber", String.valueOf(partNumber))
.method(SdkHttpMethod.PUT)
.protocol(storageTemplate.getProtocol())
.build();
return AwsS3V4Signer.create().presign(request, params).getUri().toString();