Commit e25a7fb4 by 张付兵

增加日期文件夹

parent 64d29afc
......@@ -133,7 +133,7 @@ public class FtpProxyWebApi {
BASE64Decoder decoder = new BASE64Decoder();
byte[] bytes = decoder.decodeBuffer(request.getFileBase64Content());
InputStream in = new ByteArrayInputStream(bytes);
ftpUtil.uploadFile(in, ftpConfigBean.getIllegalReportDir(), request.getFileName());
ftpUtil.uploadFile(in, ftpConfigBean.getIllegalReportDir() + request.getDate(), request.getFileName());
return ResponseGenerator.success();
} catch (Exception e) {
throw new BusinessException(e);
......
......@@ -5,6 +5,8 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @author zhangfubing
* @create 2019/10/26 16:01
......@@ -15,6 +17,10 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
public class UploadIllegalReportReq {
@NotNull
private String date; // 日期文件夹
@NotNull
private String fileName; // 文件名
@NotNull
private String fileBase64Content; // 文件base64内容
}
......@@ -4,4 +4,4 @@ biz:
port: 21
username: yfbftp
password: 1234qwer
illegalReportDir: hik_pic/illegal_report
\ No newline at end of file
illegalReportDir: hik_pic/illegal_report/
\ No newline at end of file
......@@ -4,4 +4,4 @@ biz:
port: 21
username: jsc
password: jsc
illegalReportDir: hik_pic/illegal_report
\ No newline at end of file
illegalReportDir: hik_pic/illegal_report/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment