执行mkzip 可以正常返回persistentId,但是无法在空间里找到压缩后的zip文件
private static final Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);
private static final String bucketname = "xxx";
public static void mkzipTest() {
OperationManager om = new OperationManager(auth);
String u = "http://7xsqur.com2.z0.glb.clouddn.com/gogopher.jpg";
String saveas = "abc.zip";
String fops = "mkzip/2/url/" +UrlSafeBase64.encodeToString(u)+ "|saveas/"+UrlSafeBase64.encodeToString(saveas);
System.out.println(fops);
try {
String pfop = om.pfop(bucketname, "test.zip", fops);
System.out.println(pfop);
} catch (QiniuException e) {
Response r = e.response;
// 请求失败时打印的异常的信息
// System.out.println(r.toString());
try {
// 响应的文本信息
System.out.println(r.bodyString());
} catch (QiniuException e1) {
// ignore
}
}
}

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
人生最曼妙的风景,竟是内心的淡定与从容!