LocalSysFileServiceImpl.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //package com.ruoyi.file.service;
  2. //
  3. //import org.springframework.beans.factory.annotation.Value;
  4. //import org.springframework.context.annotation.Primary;
  5. //import org.springframework.stereotype.Service;
  6. //import org.springframework.web.multipart.MultipartFile;
  7. //import com.ruoyi.file.utils.FileUploadUtils;
  8. //
  9. ///**
  10. // * 本地文件存储
  11. // *
  12. // * @author ruoyi
  13. // */
  14. //@Primary
  15. //@Service
  16. //public class LocalSysFileServiceImpl implements ISysFileService
  17. //{
  18. // /**
  19. // * 资源映射路径 前缀
  20. // */
  21. // @Value("${file.prefix}")
  22. // public String localFilePrefix;
  23. //
  24. // /**
  25. // * 域名或本机访问地址
  26. // */
  27. // @Value("${file.domain}")
  28. // public String domain;
  29. //
  30. // /**
  31. // * 上传文件存储在本地的根路径
  32. // */
  33. // @Value("${file.path}")
  34. // private String localFilePath;
  35. //
  36. // /**
  37. // * 本地文件上传接口
  38. // *
  39. // * @param file 上传的文件
  40. // * @return 访问地址
  41. // * @throws Exception
  42. // */
  43. // @Override
  44. // public String uploadFile(MultipartFile file) throws Exception
  45. // {
  46. // String name = FileUploadUtils.upload(localFilePath, file);
  47. // String url = domain + localFilePrefix + name;
  48. // return url;
  49. // }
  50. //}