|
vor 1 Jahr | |
---|---|---|
bin | vor 1 Jahr | |
doc | vor 1 Jahr | |
ruoyi-admin | vor 1 Jahr | |
ruoyi-common | vor 1 Jahr | |
ruoyi-file | vor 1 Jahr | |
ruoyi-framework | vor 1 Jahr | |
ruoyi-generator | vor 1 Jahr | |
ruoyi-quartz | vor 1 Jahr | |
ruoyi-system | vor 1 Jahr | |
ruoyi-ui | vor 1 Jahr | |
sql | vor 1 Jahr | |
.gitignore | vor 1 Jahr | |
LICENSE | vor 1 Jahr | |
README.md | vor 1 Jahr | |
pom.xml | vor 1 Jahr |
名称 | 说明 | 例如 |
---|---|---|
name | 项目名 | 乳山 |
token | 项目唯一标识. 前端上传文件必须携带 | rushan |
remote_host | 远程项目地址. 前端或后端, 如果不能跨域则使用前端地址 | 如果使用后端地址: http://127.0.0.1:8080; 如果使用前端地址: http://127.0.0.1/api |
disk_path | 文件存储路径. application.yml中的nsgk.profile值, 路径分隔符必须使用正斜杠 | D:/NsgkSoft/files/nsgk/uploadPath |
disabled | 是否禁用. 1 或 0 | 1 则禁止上传 |
仅上传
/open/file/upload/{项目唯一标识}/{存储目录}
上传并重定向
/open/file/uploadForward/{项目唯一标识}/{存储目录}
- 必须参数: redirectUri 重定向地址, 必须是可以GET请求
- 其他参数: 将拼接到地址中
上传并转发
/open/file/uploadForward/{项目唯一标识}/{存储目录}
- 必须参数: requestUri 请求地址
- 必须参数: method 请求方法 默认get
- 必须参数: contentType 请求类型 get自动设为application/x-www-form-urlencoded, post默认application/json
- 必须参数: responseContentType 响应类型 默认application/json
- 其他参数: data 请求数据 String
通用上传
/open/ruralCollectiveAssets/common/upload
- 必须参数: token 项目唯一标识
- 必须参数: bizPath 存储目录, 默认upload
- 重定向到:
{remote_host}
/file/common/upload, 对应{remote_host}
/common/upload
附件上传
/open/ruralCollectiveAssets/common/attach
- 必须参数: token 项目唯一标识
- 必须参数: bizPath 存储目录
- 必须参数: tableName 表名
- 必须参数: tableId 表ID
- 可选参数: fileType 额外类型
- 重定向到:
{remote_host}
/file/common/attach, 对应{remote_host}
/common/attach
客户服务器nginx配置代理
location /file_server {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^/file_server/(.*)$ /$1 break;
proxy_pass http://localhost:8077;
}