| | |
| | | package com.doumee.core.utils.aliyun; |
| | | |
| | | import com.aliyun.auth.credentials.Credential; |
| | | import com.aliyun.auth.credentials.provider.StaticCredentialProvider; |
| | | import com.aliyun.oss.ClientException; |
| | | import com.aliyun.oss.OSSClient; |
| | | import com.aliyun.oss.OSSException; |
| | | import com.aliyun.oss.model.*; |
| | | import com.aliyun.sdk.service.cloudauth20190307.AsyncClient; |
| | | import com.aliyun.sdk.service.cloudauth20190307.models.Id2MetaVerifyRequest; |
| | | import com.aliyun.sdk.service.cloudauth20190307.models.Id2MetaVerifyResponse; |
| | | import com.doumee.core.utils.FileDigest; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | | import com.google.gson.Gson; |
| | | import darabonba.core.client.ClientOverrideConfiguration; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | return filename; |
| | | } |
| | | |
| | | public static void main(String[] args) throws OSSException, |
| | | ClientException, IOException { |
| | | ALiYunUtil aLiYunUtil = new ALiYunUtil("", "uc4nnpsqep1i9fijqr37nokh", |
| | | "/rp41xCx/XdGEVCptdH6v7xpc9w="); |
| | | // aLiYunUtil.uploadObject("pongto", "work/li2.txt", "D://哈.txt", |
| | | // ".html,.html text/html");D://装机软件/办公学习 |
| | | // aLiYunUtil.partUploadObject("pongto", "work/ps.exe", |
| | | // "D://装机软件/办公学习/Adobe_Illustrator_CS6_XiaZaiBa.exe", |
| | | // ".html,.html text/html"); |
| | | // aLiYunUtil.deleteBucket("pongto"); |
| | | } |
| | | // public static void main(String[] args) throws OSSException, |
| | | // ClientException, IOException { |
| | | // ALiYunUtil aLiYunUtil = new ALiYunUtil("", "uc4nnpsqep1i9fijqr37nokh", |
| | | // "/rp41xCx/XdGEVCptdH6v7xpc9w="); |
| | | // // aLiYunUtil.uploadObject("pongto", "work/li2.txt", "D://哈.txt", |
| | | // // ".html,.html text/html");D://装机软件/办公学习 |
| | | // // aLiYunUtil.partUploadObject("pongto", "work/ps.exe", |
| | | // // "D://装机软件/办公学习/Adobe_Illustrator_CS6_XiaZaiBa.exe", |
| | | // // ".html,.html text/html"); |
| | | // // aLiYunUtil.deleteBucket("pongto"); |
| | | // } |
| | | |
| | | /** |
| | | * 上传网络文件 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |