|
@@ -519,13 +519,25 @@ public class FileUtils {
|
|
|
BladeFile bladeFile = newIOSSClient.uploadFile(absoluteFileName, filePath);
|
|
|
//BladeFile bladeFile = newIOSSClient.uploadFile(fileName,filePath,OssConstant.ARCHIVE_DIRECTORY,projectId);
|
|
|
result.add(bladeFile.getLink());
|
|
|
-// File f = new File(filePath);
|
|
|
-// f.deleteOnExit();
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
result.add(filePath);
|
|
|
}
|
|
|
|
|
|
out.close();
|
|
|
+
|
|
|
+ //删除临时文件
|
|
|
+ try {
|
|
|
+ File fileToDelete = new File(filePath);
|
|
|
+ if (fileToDelete.exists()) {
|
|
|
+ fileToDelete.delete();
|
|
|
+ log.info("已删除临时文件:" + filePath);
|
|
|
+ }
|
|
|
+ } catch (Exception ex) {
|
|
|
+ ex.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
e = System.currentTimeMillis();
|
|
|
log.info("pdf打码耗时:"+(e-s));
|
|
|
} catch (Exception e) {
|