|
@@ -1427,13 +1427,15 @@ public class PrintCommonServiceImpl implements PrintCommonService {
|
|
|
try {
|
|
|
boolean oss = dictionaryConfig.sysDomain().isOss();
|
|
|
String pdfDirName = pdfFile.getPath();
|
|
|
- String pdfDirNameStr = pdfDirName.replace("\\\\", "/");
|
|
|
+
|
|
|
+ String sysConfigPath = dictionaryConfig.fssLocalPdfDomain().getConfig() + File.separator;
|
|
|
+ String pdfDirNameStr = pdfDirName.replace("\\", "/").replaceAll(sysConfigPath.replace("\\", "/"),"");
|
|
|
|
|
|
byte[] data = ByteArray.fromFile(pdfFile).value();
|
|
|
String md5 = ByteArray.md5(data).toHexString();
|
|
|
InputStream ins = new ByteArrayInputStream(data);
|
|
|
if (oss) {//上传至oss
|
|
|
- fileStoreUtil.ossUpload(pdfDirNameStr, ins, md5, fileStoreUtil.getUploadEnumByPath(pdfDirNameStr).getFssType());
|
|
|
+ fileStoreUtil.ossUpload(pdfDirNameStr, ins, md5, UploadFileEnum.PDF.getFssType());
|
|
|
ins.close();
|
|
|
}
|
|
|
JSONObject object = new JSONObject();
|