package nft.cos;

import config.Config;
import util.ZxlSDKUtil;

public class Test {
    public static void main(String[] args) throws Exception {
        //获取临时密钥，只能用4min左右
        CreateSecret CreateSecret = new CreateSecret("小猫1111", Config.platformPubKey);
        CreateSecretResp resp = CreateSecret.createSecret(Config.platformPrivateKey);
        System.out.println(resp);
        //上传cos
        ZxlSDKUtil.uploadToCos(resp.getUploadAddress()+"小猫.jpg", resp.getTempSecretId(), resp.getTempSecretKey(), resp.getSessionToken(), "https://ichef.bbci.co.uk/ace/ws/640/cpsprodpb/1912/production/_105981460_d9ff6226-aae3-4bba-8634-d26742299c80.jpg");
    }
}
