|
|
@@ -38,9 +38,11 @@ import me.zhengjie.modules.file.FileHandleVo;
|
|
|
public class FileUploadUtil {
|
|
|
|
|
|
private static FileHandle fileHandle;
|
|
|
-
|
|
|
+ //创建临时目录
|
|
|
+ private static String tempDir;
|
|
|
public static void setFileHandle(FileHandle fileHandle) {
|
|
|
FileUploadUtil.fileHandle = fileHandle;
|
|
|
+ tempDir=createTempDir("upload");
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
@@ -423,7 +425,7 @@ public class FileUploadUtil {
|
|
|
if (html == null) {
|
|
|
return null;
|
|
|
}
|
|
|
- String uploadPath = createTempDir("upload");
|
|
|
+ String uploadPath = tempDir;
|
|
|
// 拼接文件路径
|
|
|
String fileName = UUIDGenerator.uuid() + ".pdf";
|
|
|
String path = businessNo + "/" + StepStatusEnum.getType(orderId) + "/" + fileName;
|
|
|
@@ -457,7 +459,7 @@ public class FileUploadUtil {
|
|
|
if (html == null) {
|
|
|
return null;
|
|
|
}
|
|
|
- String uploadPath = AppConfigInfo.APP_UPLOAD_PATH;
|
|
|
+ String uploadPath = tempDir;
|
|
|
|
|
|
String sourceFilePath = uploadPath + pdfPath;
|
|
|
InputStream inputStream = null;
|