|
|
@@ -544,8 +544,9 @@ public class PDFUtil {
|
|
|
} else if (os.contains("windows")) {
|
|
|
tempDir = System.getProperty("java.io.tmpdir");
|
|
|
}
|
|
|
- String last = path.substring(path.lastIndexOf(".") + 1);
|
|
|
- File file =new File(tempDir+ UUID.randomUUID()+"."+last);
|
|
|
+// String last = path.substring(path.lastIndexOf(".") + 1);
|
|
|
+ // minio 无后缀文件名过长 导致无法创建临时文件 文件名使用uuid
|
|
|
+ File file =new File(tempDir+ UUID.randomUUID());
|
|
|
String encodeUrl = FileUtil.urlEncodeChinese(path);
|
|
|
URI u = URI.create(encodeUrl);
|
|
|
HttpUtils.disableSSLCertificateChecking();
|
|
|
@@ -553,7 +554,7 @@ public class PDFUtil {
|
|
|
InputStream inputStream = u.toURL().openStream();
|
|
|
FileUtil.copyInputStreamToFile(inputStream, file);
|
|
|
}catch(Exception e){
|
|
|
-
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
return file.getPath();
|
|
|
} else {
|