Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.14 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.14 KB

CloudStorageMaster

云存储工具服务(Cloud Storage Service),目前仅支持阿里云OSS

功能

  • 上传文件
  • 下载文件
  • 删除文件
  • 文件断存在

使用方法

  • groovy
implementation platform("com.xiaohaoo:xiaohao-dependencies:1.0.1")
implementation "com.xiaohaoo:cloud-storage-master"
  • kotlin
implementation(platform("com.xiaohaoo.dependencies:xiaohao-dependencies:1.0.1"))
implementation("com.xiaohaoo:cloud-storage-master")

使用方法

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

License

GNU Affero General Public License v3.0