Commit 33885f4f by zhangxk

修改ftp文件上传路径,图片和视频路径分开放

1 parent fc88bf28
......@@ -30,8 +30,11 @@ public interface Process {
LOGGER.error("", e);
}
fileName = StringUtil.subFileName(fileName);
if(fileName.endsWith(".mp4") || fileName.endsWith("avi")){
return "video/" + yyyyMMdd + "/12401/" + fileName;
}
return "image/" + yyyyMMdd + "/12401/event/" + fileName;
}
static byte[] downloadFile(String url) {
......
......@@ -12,6 +12,9 @@ public class StringUtil {
* @param filename -
*/
public static String subFileName(String filename){
if(filename == null){
return "";
}
int i = filename.lastIndexOf("/");
filename = StringUtils.substring(filename,i+1,filename.length());
return filename;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!