Pre Merge pull request !70 from Mood/N/A

pull/70/MERGE
Mood 3 years ago committed by Gitee
commit 5d7fbc94f4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -1,6 +1,7 @@
package com.ruoyi.file.service; package com.ruoyi.file.service;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import com.ruoyi.file.utils.FileUploadUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -36,7 +37,7 @@ public class FastDfsSysFileServiceImpl implements ISysFileService
public String uploadFile(MultipartFile file) throws Exception public String uploadFile(MultipartFile file) throws Exception
{ {
StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(), StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(),
FilenameUtils.getExtension(file.getOriginalFilename()), null); FileUploadUtils.getExtension(file), null);
return domain + "/" + storePath.getFullPath(); return domain + "/" + storePath.getFullPath();
} }
} }

Loading…
Cancel
Save