doCompressed method

Future<AKTinyCompressedResult> doCompressed()

Implementation

Future<AKTinyCompressedResult> doCompressed() async {
  var uploadResponse = await upload();
  if (uploadResponse.statusCode != 201) {
    print("doCompressed => 上传失败:${file.path}");
    return AKTinyCompressedResult(uploadResult: uploadResponse, downloadResult: null);
  }
  var downloadResponse = await download(uploadResponse);
  if (downloadResponse.statusCode != 200) {
    print("doCompressed => 下载失败:${file.path}");
  }
  return AKTinyCompressedResult(uploadResult: uploadResponse, downloadResult: downloadResponse);
}