FastDfsSysFileServiceImpl.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //package com.ruoyi.file.service;
  2. //
  3. //import org.apache.commons.io.FilenameUtils;
  4. //import org.springframework.beans.factory.annotation.Autowired;
  5. //import org.springframework.beans.factory.annotation.Value;
  6. //import org.springframework.stereotype.Service;
  7. //import org.springframework.web.multipart.MultipartFile;
  8. //import com.github.tobato.fastdfs.domain.fdfs.StorePath;
  9. //import com.github.tobato.fastdfs.service.FastFileStorageClient;
  10. //
  11. ///**
  12. // * FastDFS 文件存储
  13. // *
  14. // * @author ruoyi
  15. // */
  16. //@Service
  17. //public class FastDfsSysFileServiceImpl implements ISysFileService
  18. //{
  19. // /**
  20. // * 域名或本机访问地址
  21. // */
  22. // @Value("${fdfs.domain}")
  23. // public String domain;
  24. //
  25. // @Autowired
  26. // private FastFileStorageClient storageClient;
  27. //
  28. // /**
  29. // * FastDfs文件上传接口
  30. // *
  31. // * @param file 上传的文件
  32. // * @return 访问地址
  33. // * @throws Exception
  34. // */
  35. // @Override
  36. // public String uploadFile(MultipartFile file) throws Exception
  37. // {
  38. // StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(),
  39. // FilenameUtils.getExtension(file.getOriginalFilename()), null);
  40. // return domain + "/" + storePath.getFullPath();
  41. // }
  42. //}