From 5d4e65e07f8f90a761b3885df38004ad0eacfdb2 Mon Sep 17 00:00:00 2001
From: xuyanwu <1171736840@qq.com>
Date: Wed, 13 Sep 2023 17:51:40 +0800
Subject: [PATCH 01/31] =?UTF-8?q?Fix:Amazon=20S3=20=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E5=81=B6=E7=8E=B0=20ResetException=20?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../spring/file/storage/platform/AmazonS3FileStorage.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/file-storage-core/src/main/java/cn/xuyanwu/spring/file/storage/platform/AmazonS3FileStorage.java b/file-storage-core/src/main/java/cn/xuyanwu/spring/file/storage/platform/AmazonS3FileStorage.java
index 7956dcfc..0a06cfc8 100644
--- a/file-storage-core/src/main/java/cn/xuyanwu/spring/file/storage/platform/AmazonS3FileStorage.java
+++ b/file-storage-core/src/main/java/cn/xuyanwu/spring/file/storage/platform/AmazonS3FileStorage.java
@@ -7,6 +7,7 @@
import cn.xuyanwu.spring.file.storage.ProgressListener;
import cn.xuyanwu.spring.file.storage.UploadPretreatment;
import cn.xuyanwu.spring.file.storage.exception.FileStorageRuntimeException;
+import com.amazonaws.RequestClientOptions;
import com.amazonaws.event.ProgressEventType;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.*;
@@ -14,6 +15,7 @@
import lombok.NoArgsConstructor;
import lombok.Setter;
+import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -113,7 +115,8 @@ public boolean save(FileInfo fileInfo,UploadPretreatment pre) {
if (fileAcl != null) client.setObjectAcl(bucketName,newFileKey,fileAcl);
if (listener != null) listener.finish();
} else {
- PutObjectRequest request = new PutObjectRequest(bucketName,newFileKey,in,metadata);
+ BufferedInputStream bin = new BufferedInputStream(in,RequestClientOptions.DEFAULT_STREAM_BUFFER_SIZE);
+ PutObjectRequest request = new PutObjectRequest(bucketName,newFileKey,bin,metadata);
request.setCannedAcl(fileAcl);
if (listener != null) {
AtomicLong progressSize = new AtomicLong();
From 2b5990ca8f4f4156b05b541d434f53e4c7900f11 Mon Sep 17 00:00:00 2001
From: xuyanwu <1171736840@qq.com>
Date: Sun, 17 Sep 2023 19:05:47 +0800
Subject: [PATCH 02/31] =?UTF-8?q?Add:=E6=96=87=E6=A1=A3=E9=A1=B5=E8=84=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/_footer.md | 7 +++++++
docs/index.html | 3 +++
2 files changed, 10 insertions(+)
create mode 100644 docs/_footer.md
diff --git a/docs/_footer.md b/docs/_footer.md
new file mode 100644
index 00000000..bc18b3d4
--- /dev/null
+++ b/docs/_footer.md
@@ -0,0 +1,7 @@
+[ 皖公网安备 34112602000212号](http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=34112602000212)
+
+[皖ICP备18026185号-1](https://beian.miit.gov.cn)
+
+[我的博客(常年不更新)](https://xuyanwu.cn)
+
+[用 JavaScript 在浏览器中控制台观看 BadApple!!](https://app.xuyanwu.cn/BadApple/)
diff --git a/docs/index.html b/docs/index.html
index ed32767c..14309f9c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -21,6 +21,7 @@
window.$docsify = {
loadSidebar: true,
loadNavbar: true,
+ loadFooter: true,
subMaxLevel: 3,
name: 'X Spring File Storage',
repo: 'https://github.com/1171736840/spring-file-storage',
@@ -56,6 +57,8 @@
+
+