Skip to content

Commit f7baa6e

Browse files
authored
Merge pull request #327 from dromara/dev
Dev
2 parents acef725 + 0a9dc96 commit f7baa6e

File tree

48 files changed

+4181
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4181
-233
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
22
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
maven=3.8.1
3+
maven=3.9.9
44
java=8.0.302-open

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<a href='https://gitee.com/dromara/x-file-storage'>
2626
<img src='https://gitee.com/dromara/x-file-storage/badge/star.svg?theme=dark' alt='star' />
2727
</a>
28+
<a href='https://gitcode.com/dromara/x-file-storage'>
29+
<img src='https://gitcode.com/dromara/x-file-storage/star/badge.svg' alt='star' />
30+
</a>
2831
<br />
2932
<a href='https://jq.qq.com/?_wv=1027&k=eGfeNqka'>
3033
<img src='https://img.shields.io/badge/QQ%E7%BE%A4-515706495-orange' alt='515706495' />
@@ -39,7 +42,8 @@
3942
### 📚简介
4043

4144
一行代码将文件存储到本地、FTP、SFTP、WebDAV、阿里云 OSS、华为云 OBS、七牛云 Kodo、腾讯云 COS、百度云 BOS、又拍云 USS、MinIO、
42-
Amazon S3、GoogleCloud Storage、FastDFS、 Azure Blob Storage、Cloudflare R2、金山云 KS3、美团云 MSS、京东云 OSS、天翼云 OOS、移动 云EOS、沃云 OSS、
45+
Amazon S3、Amazon S3 V2、GoogleCloud Storage、FastDFS、 Azure Blob Storage、Mongo GridFS、Mongo GridFS、go-fastdfs、
46+
火山引擎 TOS、Cloudflare R2、金山云 KS3、美团云 MSS、京东云 OSS、天翼云 OOS、移动 云EOS、沃云 OSS、
4347
网易数帆 NOS、Ucloud US3、青云 QingStor、平安云 OBS、首云 OSS、IBM COS、其它兼容 S3 协议的存储平台。查看 [所有支持的存储平台](https://x-file-storage.xuyanwu.cn/#/存储平台)
4448

4549
💡 通过 WebDAV 连接到 Alist 后,可以使用百度网盘、天翼云盘、阿里云盘、迅雷网盘等常见存储服务,查看 [Alist 支持的存储平台](https://alist.nn.ci/zh/guide/webdav.html#webdav-%E5%AD%98%E5%82%A8%E6%94%AF%E6%8C%81)
@@ -49,13 +53,16 @@ Amazon S3、GoogleCloud Storage、FastDFS、 Azure Blob Storage、Cloudflare R2
4953
GitHub:https://github.com/dromara/x-file-storage
5054
<br />
5155
Gitee:https://gitee.com/dromara/x-file-storage
56+
<br />
57+
GitCode:https://gitcode.com/dromara/x-file-storage
5258

5359
-------
5460

5561
### 📜更新记录
5662

5763
这里是简要的更新记录,查看 [详细的更新记录](https://x-file-storage.xuyanwu.cn/#/更新记录)
5864

65+
`2.3.0` 新增 Mongo GridFS、go-fastdfs、Amazon S3 V2、火山引擎 TOS 存储平台,修复资源泄露、上传等问题 [更新记录](https://x-file-storage.xuyanwu.cn/#/更新记录?id=_230)
5966
`2.2.1` 修复某些情况下哈希计算错误的问题、七牛云 Kodo 预签名 URL 无法使用的问题 [更新记录](https://x-file-storage.xuyanwu.cn/#/更新记录?id=_221)
6067
<br />
6168
`2.2.0` 修复大量问题,新增获取文件、列举文件,重构预签名 URL 支持客户端上传、下载、删除等操作,新增 Solon 插件,优化手动分片上传等功能,详情查看 [更新记录](https://x-file-storage.xuyanwu.cn/#/更新记录?id=_220)
@@ -68,7 +75,7 @@ Gitee:https://gitee.com/dromara/x-file-storage
6875

6976
### 📅更新计划
7077

71-
- 接入存储平台:HDFS、火山云 TOS、Samba、NFS
78+
- 接入存储平台:HDFS、Samba、NFS
7279
- 追加缩略图
7380
- 文件内容预加载
7481
- 新增 Access 模块,尝试通过 HTTP、FTP、WebDAV 等协议对外提供接口,方便其它程序使用
@@ -92,7 +99,7 @@ Gitee:https://gitee.com/dromara/x-file-storage
9299
<dependency>
93100
<groupId>org.dromara.x-file-storage</groupId>
94101
<artifactId>x-file-storage-spring</artifactId>
95-
<version>2.2.1</version>
102+
<version>2.3.0</version>
96103
</dependency>
97104
<!-- 引入 阿里云 OSS SDK,如果使用其它存储平台,就引入对应的 SDK -->
98105
<dependency>
@@ -260,7 +267,8 @@ X File Storage 的源码分为两个分支,功能如下:
260267
提交问题反馈请说明正在 X File Storage 版本、相关依赖库版本、配置参数及问题代码
261268

262269
[Gitee issue](https://gitee.com/dromara/x-file-storage/issues)<br/>
263-
[GitHub issue](https://github.com/dromara/x-file-storage/issues)
270+
[GitHub issue](https://github.com/dromara/x-file-storage/issues)<br/>
271+
[GitCode issue](https://gitcode.com/dromara/x-file-storage/issues)
264272

265273
#### 🧬贡献代码的步骤
266274

@@ -272,7 +280,7 @@ X File Storage 的源码分为两个分支,功能如下:
272280
6. 等待维护者合并
273281

274282
#### 🧬 开发约定 & 配置
275-
1. JDK 11+、Maven 3.8.1+
283+
1. JDK 11+、Maven 3.9.9+
276284
2. 代码风格,目前代码风格通过 spotless-maven-plugin + palantir-java-format 统一控制,Maven 构建时统一格式化代码
277285
3. 在开发阶段,IDE 要识别到 spotless-maven-plugin + palantir-java-format 需要安装插件:[palantir-java-format](https://plugins.jetbrains.com/plugin/13180-palantir-java-format)
278286

@@ -295,7 +303,8 @@ X File Storage 感谢各位小伙伴的信任与支持,如果您已经在项
295303
<a target="_blank" href="https://spring-file-storage.xuyanwu.cn">spring-file-storage.xuyanwu.cn</a>
296304

297305
[在 Gitee 上登记](https://gitee.com/dromara/x-file-storage/issues/I83Q6R)<br/>
298-
[在 GitHub 上登记](https://github.com/dromara/x-file-storage/issues/114)
306+
[在 GitHub 上登记](https://github.com/dromara/x-file-storage/issues/114)<br/>
307+
[在 GitCode 上登记](https://gitcode.com/dromara/x-file-storage/issues/1)
299308

300309
-------
301310

docs/Metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 使用
44

5-
可以在上传时传入 Metadata 和 UserMetadata ,目前仅 华为云 OBS、阿里云 OSS、腾讯云 COS、百度云 BOS、七牛云 Kodo、又拍云 USS、MinIO、Amazon S3、GoogleCloud Storage、FastDFS、Azure Blob Storage 平台支持
5+
可以在上传时传入 Metadata 和 UserMetadata ,目前仅 华为云 OBS、阿里云 OSS、腾讯云 COS、百度云 BOS、七牛云 Kodo、又拍云 USS、MinIO、Amazon S3、Amazon S3 V2、GoogleCloud Storage、FastDFS、Azure Blob Storage、Mongo GridFS、火山引擎 TOS 平台支持
66

77
```java
88
//判断是否支持 Metadata

docs/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<a target="_blank" href='https://gitee.com/dromara/x-file-storage'>
2626
<img src='https://gitee.com/dromara/x-file-storage/badge/star.svg?theme=dark' alt='star' />
2727
</a>
28+
<a href='https://gitcode.com/dromara/x-file-storage'>
29+
<img src='https://gitcode.com/dromara/x-file-storage/star/badge.svg' alt='star' />
30+
</a>
2831
<a target="_blank" href='https://jq.qq.com/?_wv=1027&k=eGfeNqka'>
2932
<img src='https://img.shields.io/badge/QQ%E7%BE%A4-515706495-orange' alt='515706495' />
3033
</a>
@@ -40,7 +43,8 @@
4043
# 📚简介
4144

4245
一行代码将文件存储到本地、FTP、SFTP、WebDAV、阿里云 OSS、华为云 OBS、七牛云 Kodo、腾讯云 COS、百度云 BOS、又拍云 USS、MinIO、
43-
Amazon S3、GoogleCloud Storage、FastDFS、 Azure Blob Storage、Cloudflare R2、金山云 KS3、美团云 MSS、京东云 OSS、天翼云 OOS、移动 云EOS、沃云 OSS、
46+
Amazon S3、Amazon S3 V2、GoogleCloud Storage、FastDFS、 Azure Blob Storage、Mongo GridFS、Mongo GridFS、go-fastdfs、
47+
火山引擎 TOS、Cloudflare R2、金山云 KS3、美团云 MSS、京东云 OSS、天翼云 OOS、移动 云EOS、沃云 OSS、
4448
网易数帆 NOS、Ucloud US3、青云 QingStor、平安云 OBS、首云 OSS、IBM COS、其它兼容 S3 协议的存储平台。查看 [所有支持的存储平台](存储平台)
4549

4650
💡 通过 WebDAV 连接到 Alist 后,可以使用百度网盘、天翼云盘、阿里云盘、迅雷网盘等常见存储服务,查看 [Alist 支持的存储平台](https://alist.nn.ci/zh/guide/webdav.html#webdav-%E5%AD%98%E5%82%A8%E6%94%AF%E6%8C%81)
@@ -50,13 +54,16 @@ Amazon S3、GoogleCloud Storage、FastDFS、 Azure Blob Storage、Cloudflare R2
5054
GitHub:https://github.com/dromara/x-file-storage
5155
<br />
5256
Gitee:https://gitee.com/dromara/x-file-storage
57+
<br />
58+
GitCode:https://gitcode.com/dromara/x-file-storage
5359

5460
-------
5561

5662
# 📜更新记录
5763

5864
这里是简要的更新记录,查看 [详细的更新记录](更新记录)
5965

66+
`2.3.0` 新增 Mongo GridFS、go-fastdfs、Amazon S3 V2、火山引擎 TOS 存储平台,修复资源泄露、上传等问题 [更新记录](更新记录?id=_230)
6067
`2.2.1` 修复某些情况下哈希计算错误的问题、七牛云 Kodo 预签名 URL 无法使用的问题 [更新记录](更新记录?id=_221)
6168
<br />
6269
`2.2.0` 修复大量问题,新增获取文件、列举文件,重构预签名 URL 支持客户端上传、下载、删除等操作,新增 Solon 插件,优化手动分片上传等功能,详情查看 [更新记录](更新记录?id=_220)
@@ -69,7 +76,7 @@ Gitee:https://gitee.com/dromara/x-file-storage
6976

7077
# 📅更新计划
7178

72-
- 接入存储平台:HDFS、火山云 TOS、Samba、NFS
79+
- 接入存储平台:HDFS、Samba、NFS
7380
- 追加缩略图
7481
- 文件内容预加载
7582
- 新增 Access 模块,尝试通过 HTTP、FTP、WebDAV 等协议对外提供接口,方便其它程序使用
@@ -128,7 +135,8 @@ X File Storage 的源码分为两个分支,功能如下:
128135
提交问题反馈请说明正在 X File Storage 版本、相关依赖库版本、配置参数及问题代码
129136

130137
[Gitee issue](https://gitee.com/dromara/x-file-storage/issues)<br/>
131-
[GitHub issue](https://github.com/dromara/x-file-storage/issues)
138+
[GitHub issue](https://github.com/dromara/x-file-storage/issues)<br/>
139+
[GitCode issue](https://gitcode.com/dromara/x-file-storage/issues)
132140

133141
## 🧬贡献代码的步骤
134142

@@ -158,7 +166,8 @@ X File Storage 感谢各位小伙伴的信任与支持,如果您已经在项
158166
<a target="_blank" href="https://spring-file-storage.xuyanwu.cn">spring-file-storage.xuyanwu.cn</a>
159167

160168
[在 Gitee 上登记](https://gitee.com/dromara/x-file-storage/issues/I83Q6R)<br/>
161-
[在 GitHub 上登记](https://github.com/dromara/x-file-storage/issues/114)
169+
[在 GitHub 上登记](https://github.com/dromara/x-file-storage/issues/114)<br/>
170+
[在 GitCode 上登记](https://gitcode.com/dromara/x-file-storage/issues/1)
162171

163172
-------
164173

docs/_navbar.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
* 🌟文档版本 2.2.0
1+
* 🌟文档版本 2.3.0
22

3+
* [2.3.0](https://x-file-storage.xuyanwu.cn/2.3.0/)
4+
* [2.2.1](https://x-file-storage.xuyanwu.cn/2.2.1/)
35
* [2.2.0](https://x-file-storage.xuyanwu.cn/2.2.0/)
46
* [2.1.0](https://x-file-storage.xuyanwu.cn/2.1.0/)
57
* [2.0.0](https://x-file-storage.xuyanwu.cn/2.0.0/)

docs/acl.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ACL 访问控制列表
22

3-
也叫预定义访问策略,目前仅 华为云 OBS、阿里云 OSS、腾讯云 COS、百度云 BOS、Amazon S3、GoogleCloud Storage、Azure Blob Storage 平台支持
3+
也叫预定义访问策略,目前仅 华为云 OBS、阿里云 OSS、腾讯云 COS、百度云 BOS、Amazon S3、Amazon S3 V2、GoogleCloud Storage、Azure Blob Storage、火山引擎 TOS 平台支持
44

55
Azure Blob Storage 即使将文件的 ACL 设置为 公共读`PUBLIC_READ` ,上传成功后的 `url` 也无法通过浏览器直接公开访问 ,详情阅读 [兼容性说明-AzureBlobStorage](存储平台?id=OCI_AzureBlobStorage) 章节
66

@@ -94,6 +94,15 @@ fileStorageService.of(file).setFileAcl(CannedAccessControlList.Private).upload()
9494
fileStorageService.of(file).setFileAcl(CannedAccessControlList.Private).upload();
9595
```
9696

97+
#### **Amazon S3 V2**
98+
99+
```java
100+
//使用官方 SDK 中定义好的
101+
fileStorageService.of(file).setFileAcl(ObjectCannedACL.PRIVATE).upload();
102+
//或者直接使用 Amazon S3 V2 支持的字符串
103+
fileStorageService.of(file).setFileAcl("public-read-write").upload();
104+
```
105+
97106
#### **GoogleCloud Storage**
98107

99108
```java
@@ -132,6 +141,13 @@ List<PathAccessControlEntry> acl = PathAccessControlEntry.parseList("user::rw-,g
132141
fileStorageService.of(file).setFileAcl(acl).upload();
133142
```
134143

144+
#### **火山引擎 TOS**
145+
146+
```java
147+
//使用官方 SDK 中定义好的
148+
fileStorageService.of(file).setFileAcl(ACLType.ACL_PRIVATE).upload();
149+
```
150+
135151
<!-- tabs:end -->
136152

137153
> [!WARNING|label:重要提示:]

docs/在Solon中使用.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<dependency>
1111
<groupId>org.dromara.x-file-storage</groupId>
1212
<artifactId>x-file-storage-solon</artifactId>
13-
<version>2.2.1</version>
13+
<version>2.3.0</version>
1414
</dependency>
1515
```
1616

docs/基础功能.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public class HttpServletRequestFileTest {
164164

165165
一般情况下,使用前文介绍的上传方式就已经足够使用了,大文件会在内部自动进行分片上传。<br/>
166166
但是还存在着不足,例如无法多线程并行上传、无法断点续传等,现在可以参考以下方式使用手动分片上传来实现这些功能。<br/>
167-
目前仅支持 本地、本地升级版本、华为云 OBS、阿里云 OSS、腾讯云 COS、百度云 BOS、七牛云 Kodo、又拍云 USS、MinIO、Amazon S3
167+
目前仅支持 本地、本地升级版本、华为云 OBS、阿里云 OSS、腾讯云 COS、百度云 BOS、七牛云 Kodo、又拍云 USS、MinIO、Amazon S3、GoogleCloud Storage、Azure Blob Storage
168168

169169
#### 手动分片上传-是否支持
170170
```java
@@ -746,7 +746,7 @@ boolean supportSameCopy = fileStorageService.isSupportSameCopy("aliyun-oss-1");
746746

747747
`跨存储平台移动` 是通过先复制再删除源文件的方式实现的,`跨存储平台复制` 时速度受网络影响,详情见 [复制](基础功能?id=复制) 章节
748748

749-
`本地``FTP``SFTP``WebDAV``七牛云 Kodo``又拍云 USS` 支持 `同存储平台移动` ,其它不支持的存储平台默认会自动使用 `跨存储平台移动`
749+
`本地``FTP``SFTP``WebDAV``七牛云 Kodo``又拍云 USS` `Mongo GridFS``火山引擎 TOS` 支持 `同存储平台移动` ,其它不支持的存储平台默认会自动使用 `跨存储平台移动`
750750

751751

752752
```java

0 commit comments

Comments
 (0)