We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本1.90
问题一:
例如正确地址 http://127.0.0.1:8333/testbucket/file/topic/2020-08-19/image/93380c2d1739420d88ad743ed9ed02c0a16d44128a84c4e56b67cc8bf77d07bbc.jpg
使用listObjectsV2查询返回地址
http://127.0.0.1:8333/testbucket/file/topic/2020-08-19/image93380c2d1739420d88ad743ed9ed02c0a16d44128a84c4e56b67cc8bf77d07bbc.jpg
对比发现在文件名前面少了一个斜杆
查询代码:
`S3Client s3Client = ...
ListObjectsV2Request listObjectsReqManual = ListObjectsV2Request.builder() .bucket("testbucket") .maxKeys(6) .prefix("file/topic/") .build();
boolean done = false; while (!done) { ListObjectsV2Response listObjResponse = s3Client.listObjectsV2(listObjectsReqManual); for (S3Object content : listObjResponse.contents()) { System.out.println(content.key()); }
if (listObjResponse.nextContinuationToken() == null) { done = true; } System.out.println("分页"); listObjectsReqManual = listObjectsReqManual.toBuilder() .continuationToken(listObjResponse.nextContinuationToken()) .build();
}`
问题二:建议S3接口实现Policy功能 使用S3接口就是需要它的预签名功能,Policy里的content-length-range属性可以限制上传文件大小,这样在客户端使用预签名URL直传就不会让文件上传大小超出限制
参照API https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/dev/HTTPPOSTExamples.html https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
The text was updated successfully, but these errors were encountered:
c45ba5d
fixed the first one
Sorry, something went wrong.
29abe98
Implemented PostPolicy.
No branches or pull requests
版本1.90
问题一:
例如正确地址
http://127.0.0.1:8333/testbucket/file/topic/2020-08-19/image/93380c2d1739420d88ad743ed9ed02c0a16d44128a84c4e56b67cc8bf77d07bbc.jpg
使用listObjectsV2查询返回地址
http://127.0.0.1:8333/testbucket/file/topic/2020-08-19/image93380c2d1739420d88ad743ed9ed02c0a16d44128a84c4e56b67cc8bf77d07bbc.jpg
对比发现在文件名前面少了一个斜杆
查询代码:
`S3Client s3Client = ...
ListObjectsV2Request listObjectsReqManual = ListObjectsV2Request.builder()
.bucket("testbucket")
.maxKeys(6)
.prefix("file/topic/")
.build();
boolean done = false;
while (!done) {
ListObjectsV2Response listObjResponse = s3Client.listObjectsV2(listObjectsReqManual);
for (S3Object content : listObjResponse.contents()) {
System.out.println(content.key());
}
}`
问题二:建议S3接口实现Policy功能
使用S3接口就是需要它的预签名功能,Policy里的content-length-range属性可以限制上传文件大小,这样在客户端使用预签名URL直传就不会让文件上传大小超出限制
参照API
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html
https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/dev/HTTPPOSTExamples.html
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
The text was updated successfully, but these errors were encountered: