Commit 8b98eb3e by 淡漠

文件存储修改

1 parent d4a3643e
...@@ -287,7 +287,7 @@ public class FinanceUtils { ...@@ -287,7 +287,7 @@ public class FinanceUtils {
CosConfig cosConfig = SpringUtils.getBean(CosConfig.class); CosConfig cosConfig = SpringUtils.getBean(CosConfig.class);
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1); String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
StringBuilder cosUrl = new StringBuilder(cosConfig.getImgUrlPrefix()); StringBuilder cosUrl = new StringBuilder(cosConfig.getImgUrlPrefix());
String cosFilePath = FileUploadUtils.upload2Cos(new FileInputStream(filePath + fileName), suffix, cosConfig); String cosFilePath = FileUploadUtils.upload2Cos(new FileInputStream(new File(filePath, fileName)), suffix, cosConfig);
cosUrl.append(cosFilePath); cosUrl.append(cosFilePath);
data.put("attachment", cosUrl.toString()); data.put("attachment", cosUrl.toString());
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!