package cn.zvo.fileupload.storage.huaweicloudOBS;
import cn.zvo.fileupload.FileUpload;
import cn.zvo.fileupload.vo.UploadFileVO;
* 使用示例
* @author 管雷鸣
*
*/
public class Demo {
public static void main(String[] args) {
String key = "H0TPUBC6YDZWRxxxxxxx";
String secret = "je56lHbJ62VOhoSXcsfI9InmPAtVY9xxxxxxxxxx";
String endpoint = "obs.cn-north-4.myhuaweicloud.com";
String obsname = "cha-template";
HuaweicloudOBSStorage obsStorage = new HuaweicloudOBSStorage(key, secret, endpoint, obsname);
FileUpload fileUpload = new FileUpload();
fileUpload.setStorage(obsStorage);
UploadFileVO vo = fileUpload.uploadString("abc/1.txt", "123456");
System.out.println(vo);
}
}