Browse Source

REPORT-29472 不带后缀的文件名没有被修改

master
richie 5 years ago
parent
commit
416ba320f5
  1. 3
      plugin.xml
  2. 13
      src/main/java/com/fr/plugin/file/submit/oss/fun/OssUpload.java

3
plugin.xml

@ -2,7 +2,7 @@
<id>com.fr.plugin.file.submit.oss</id>
<name><![CDATA[OSS文件上传下载]]></name>
<active>yes</active>
<version>4.2</version>
<version>4.7</version>
<env-version>10.0</env-version>
<jartime>2019-06-13</jartime>
<vendor>author</vendor>
@ -11,6 +11,7 @@
<item type="plugin" key="com.fr.plugin.oss.universal"/>
</dependence>
<change-notes><![CDATA[
[2020-04-23]新文件名即使没有后缀,上传后也用新文件名。<br/>
[2019-06-21]适配最新的版本,修改下载乱码问题。<br/>
[2019-03-11]适配最新的10.0。<br/>
[2018-12-29]移除内置的OSS配置,依赖公共的OSS配置。<br/>

13
src/main/java/com/fr/plugin/file/submit/oss/fun/OssUpload.java

@ -65,12 +65,13 @@ public class OssUpload {
fileName = "unnamed.png";
}
if (StringUtils.isNotEmpty(myFileName)) {
int index = myFileName.lastIndexOf(".");
if (index == -1) {
realFileName = fileName;
} else {
realFileName = myFileName;
}
realFileName = myFileName;
// int index = myFileName.lastIndexOf(".");
// if (index == -1) {
// realFileName = fileName;
// } else {
// realFileName = myFileName;
// }
} else {
realFileName = fileName;
}

Loading…
Cancel
Save