1.适配百分点OSS V3接口(GAL-384)。
2.将FileMeta的属性sourceList改为source_list。
This commit is contained in:
@@ -12,7 +12,7 @@ import static com.zdjizhi.utils.system.FlowWriteConfigurations.judgeFileType;
|
||||
public class FileEdit {
|
||||
|
||||
|
||||
public static String fileUploadUrl(long cfgId,String sIp,int sPort,String dIp,int dPort,long foundTime,String account,String domain, String urlValue,String schemaType,String fileSuffix) throws Exception {
|
||||
public static String getFileUploadUrl(long cfgId,String sIp,int sPort,String dIp,int dPort,long foundTime,String account,String domain, String urlValue,String schemaType,String fileId){
|
||||
String fileType = null;
|
||||
if (judgeFileType(getFileType(urlValue))){
|
||||
fileType = getFileType(urlValue);
|
||||
@@ -24,11 +24,12 @@ public class FileEdit {
|
||||
fileType = "eml";
|
||||
}
|
||||
}
|
||||
return "http://"+ FlowWriteConfig.OOS_SERVERS+"/upload_v2"+"/"+cfgId+"/"+fileType+"/"+sIp+"/"+sPort+"/"+dIp+"/"+dPort+"/"+foundTime+"/"+account+"/"+domain+"/"+getFileName(urlValue,fileSuffix);
|
||||
|
||||
return "http://"+ FlowWriteConfig.OOS_SERVERS+"/v3/upload?cfg_id="+cfgId+"&file_id="+fileId+"&file_type="+fileType+"&found_time="+foundTime+"&s_ip="+sIp+"&s_port="+sPort+"&d_ip="+dIp+"&d_port="+dPort+"&domain="+domain+"&account="+account;
|
||||
}
|
||||
|
||||
public static String fileDownloadUrl( String urlValue,String fileSuffix) throws Exception {
|
||||
return "http://"+ FlowWriteConfig.OOS_SERVERS+"/download_v2"+"/"+getFileName(urlValue,fileSuffix);
|
||||
public static String getFileDownloadUrl(String fileId){
|
||||
return "http://"+ FlowWriteConfig.OOS_SERVERS+"/v3/download?file_id="+fileId;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +38,8 @@ public class FileEdit {
|
||||
return split[split.length-1];
|
||||
}
|
||||
|
||||
public static String getFileName(String url,String fileSuffix) throws Exception {
|
||||
public static String getFileId(String url,String fileSuffix) throws Exception {
|
||||
|
||||
String[] arr = url.split("/");
|
||||
String filename = arr[arr.length-1].substring(0,arr[arr.length-1].lastIndexOf("_"));
|
||||
String prefix = MD5Utils.md5Encode(filename);
|
||||
|
||||
Reference in New Issue
Block a user