文件服务后台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

README.md 2.1 KiB

1 år sedan
1 år sedan
1 år sedan
1 år sedan
1 år sedan
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # file_transfer
  2. ## 项目信息结构
  3. | 名称 | 说明 | 例如 |
  4. |:-:|:-:|:-:|
  5. | name | 项目名 | 乳山 |
  6. | token | 项目唯一标识. 前端上传文件必须携带 | rushan |
  7. | remote_host | 远程项目地址. 前端或后端, 如果不能跨域则使用前端地址 | 如果使用后端地址: http://127.0.0.1:8080; 如果使用前端地址: http://127.0.0.1/api |
  8. | disk_path | 文件存储路径. application.yml中的nsgk.profile值, 路径分隔符必须使用正斜杠 | D:/NsgkSoft/files/nsgk/uploadPath |
  9. | disabled | 是否禁用. 1 或 0 | 1 则禁止上传 |
  10. ----------------------------------------------------------------------------------
  11. ## 通用接口
  12. * POST请求
  13. * 单文件字段是file
  14. > 仅上传
  15. >> `/open/file/upload/{项目唯一标识}/{存储目录}`
  16. > 上传并重定向
  17. >> `/open/file/uploadForward/{项目唯一标识}/{存储目录}`
  18. > * 必须参数: redirectUri 重定向地址, 必须是可以GET请求
  19. > * 其他参数: 将拼接到地址中
  20. > 上传并转发
  21. >> `/open/file/uploadForward/{项目唯一标识}/{存储目录}`
  22. > * 必须参数: requestUri 请求地址
  23. > * 必须参数: method 请求方法 默认get
  24. > * 必须参数: contentType 请求类型 get自动设为application/x-www-form-urlencoded, post默认application/json
  25. > * 必须参数: responseContentType 响应类型 默认application/json
  26. > * 其他参数: data 请求数据 String
  27. ----------------------------------------------------------------------------------
  28. ## 财务项目专用接口
  29. * POST请求
  30. * 单文件字段是file
  31. > 通用上传
  32. >> `/open/ruralCollectiveAssets/common/upload`
  33. > * 必须参数: token 项目唯一标识
  34. > * 必须参数: bizPath 存储目录, 默认upload
  35. > * 重定向到: `{remote_host}`/file/common/upload, 对应`{remote_host}`/common/upload
  36. > 附件上传
  37. >> `/open/ruralCollectiveAssets/common/attach`
  38. > * 必须参数: token 项目唯一标识
  39. > * 必须参数: bizPath 存储目录
  40. > * 必须参数: tableName 表名
  41. > * 必须参数: tableId 表ID
  42. > * 可选参数: fileType 额外类型
  43. > * 重定向到: `{remote_host}`/file/common/attach, 对应`{remote_host}`/common/attach