.idea/inspectionProfiles/Project_Default.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.idea/libraries/Maven__com_qcloud_cos_api_5_6_24.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
hx-common.iml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/hx/util/FileUtils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.idea/inspectionProfiles/Project_Default.xml
New file @@ -0,0 +1,10 @@ <component name="InspectionProjectProfileManager"> <profile version="1.0"> <option name="myName" value="Project Default" /> <inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true"> <Languages> <language minSize="109" name="Java" /> </Languages> </inspection_tool> </profile> </component> .idea/libraries/Maven__com_qcloud_cos_api_5_6_24.xml
New file @@ -0,0 +1,13 @@ <component name="libraryTable"> <library name="Maven: com.qcloud:cos_api:5.6.24"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/com/qcloud/cos_api/5.6.24/cos_api-5.6.24.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/com/qcloud/cos_api/5.6.24/cos_api-5.6.24-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/com/qcloud/cos_api/5.6.24/cos_api-5.6.24-sources.jar!/" /> </SOURCES> </library> </component> .idea/libraries/Maven__joda_time_joda_time_2_9_9.xml
New file @@ -0,0 +1,13 @@ <component name="libraryTable"> <library name="Maven: joda-time:joda-time:2.9.9"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.9.9/joda-time-2.9.9-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.9.9/joda-time-2.9.9-sources.jar!/" /> </SOURCES> </library> </component> hx-common.iml
@@ -20,6 +20,8 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Maven: com.qcloud:cos_api:5.6.32" level="project" /> <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" /> <orderEntry type="library" name="Maven: com.qcloud:cos_api:5.6.24" level="project" /> <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" /> <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" /> src/main/java/com/hx/util/FileUtils.java
@@ -323,6 +323,52 @@ } /** * 音频上传 * @param platformIconFile * @param unifiedFolder * @param saveFolder * @param autoDateFolder * @return */ public static String handleAudioUpload(MultipartFile platformIconFile,String unifiedFolder,String saveFolder ,boolean autoDateFolder) { String fileName = ""; try { if(platformIconFile == null) { throw new TipsException("请上传音频!"); } if(autoDateFolder){ if(saveFolder.endsWith("/")){ saveFolder = saveFolder+dateFormat(new Date(),"yyyyMM")+"/"; }else{ saveFolder = saveFolder+"/"+dateFormat(new Date(),"yyyyMM")+"/"; } } fileName = dateFormat(new Date(),"yyyyMMddHHmmssSSS"); if(unifiedFolder.endsWith("/")){ if(saveFolder.startsWith("/")){ saveFolder = saveFolder.replaceFirst("/",""); unifiedFolder = unifiedFolder + saveFolder; }else{ unifiedFolder = unifiedFolder+saveFolder; } }else{ if(saveFolder.startsWith("/")){ unifiedFolder = unifiedFolder + saveFolder; }else{ unifiedFolder = unifiedFolder+"/"+saveFolder; } } fileName = saveFolder+fileUp(platformIconFile,unifiedFolder,fileName); } catch (RuntimeException e) { e.printStackTrace(); } return fileName; } /** * 2020-06-29 ChenJiaHe * @param file //文件对象 * @param filePath //上传路径