图片单独上传相关接口 - 文件名分隔后缀判空,默认PNG

pet-图片单独上传接口-2024.8.28-徐绎丰
water_xu 2024-09-02 10:03:55 +08:00
parent 6bc2d02cae
commit 692140c131
7 changed files with 42 additions and 7 deletions

View File

@ -1282,7 +1282,12 @@ public class AppGFBlindBoardController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
}else {
fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());

View File

@ -293,7 +293,12 @@ public class AppGFBreakGroundController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
}else {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());

View File

@ -773,7 +773,12 @@ public class AppGFConfinedSpaceController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
} else {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());

View File

@ -649,7 +649,12 @@ public class AppGFCutRoadController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
}else {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());

View File

@ -590,7 +590,12 @@ public class AppGFElectricityController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
}else {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());

View File

@ -574,7 +574,12 @@ public class AppGFHighWorkController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
}else {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());

View File

@ -555,7 +555,12 @@ public class AppGFHoistingController extends BaseController {
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName;
if (file.getOriginalFilename() == null) {
fileName = ".PNG";
}else {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
}
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());