converOssPath static method

String converOssPath(
  1. String filePath
)

Implementation

static String converOssPath(String filePath) {
  List strList = filePath.split('/');

  String name = strList.last;
  List nameList = name.split('_');
  String taskId = nameList[0];
  String actualOrder = nameList[1];
  String splitNumZip = nameList[3];
  String splitNum = splitNumZip.split('.').first;
  String ossUrl;
  if (splitNum == '0') {
    ossUrl =
        "$scannerOssRootDirname/$taskId/$actualOrder/${taskId}_$actualOrder.zip.flszip";
  } else {
    ossUrl =
        "$scannerOssRootDirname/$taskId/$actualOrder/$splitNum/${taskId}_$actualOrder.zip.flszip";
  }

  return ossUrl;
}