Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xiaohaoo/cloud-storage-master
云存储相关工具类,包含文件的上传、下载等。
https://github.com/xiaohaoo/cloud-storage-master
java oss
Last synced: 1 day ago
JSON representation
云存储相关工具类,包含文件的上传、下载等。
- Host: GitHub
- URL: https://github.com/xiaohaoo/cloud-storage-master
- Owner: xiaohaoo
- License: agpl-3.0
- Created: 2021-07-25T16:19:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-09T21:13:53.000Z (about 1 year ago)
- Last Synced: 2023-10-10T23:42:54.465Z (about 1 year ago)
- Topics: java, oss
- Language: Java
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## CloudStorageMaster
云存储工具服务(Cloud Storage Service),目前仅支持**阿里云OSS**。
### 功能
- [x] 上传文件
- [x] 下载文件
- [x] 删除文件
- [x] 文件断存在### 使用方法
- groovy
```groovy
implementation platform("com.xiaohaoo:xiaohao-dependencies:1.0.1")
implementation "com.xiaohaoo:cloud-storage-master"
```- kotlin
```kotlin
implementation(platform("com.xiaohaoo.dependencies:xiaohao-dependencies:1.0.1"))
implementation("com.xiaohaoo:cloud-storage-master")
```## 使用方法
```java
public class Main {
public static void main(String[] args) {
String accessKeyId = "accessKeyId";
String accessKeySecret = "accessKeySecret";
String endpoint = "https://endpoint";
CloudStorageFactory cloudStorageFactory = new AliyunCloudStorageFactory(accessKeyId, accessKeySecret, endpoint);
CloudStorageService cloudStorageService = new CloudStorageService(cloudStorageFactory);
cloudStorageService.upload(bucketName, objectName, inputStream);
}
}
```## Authors
- [xiaohaoo](https://github.com/xiaohaoo)
## License
[GNU Affero General Public License v3.0](LICENSE)