We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
比如 /api/news/search 就像这种接口。返回的avatar头像这个字段的值:"avatar":["/api/__yao/form/news/download/fields.form.%E5%9B%BE%E6%A0%87?name=/20230324/CFF7A5748688FB54C99A7BB31448A7D1.png"], 是这样的?怎么处理成可以让小程序端直接显示的值?完全不知道从哪里下手
The text was updated successfully, but these errors were encountered:
编写一个接口文件 在 apis目录中 utils.http.json
apis目录中
utils.http.json
{ "name": "图片下载", "version": "1.0.0", "description": "图片下载", "group": "utils", "guard": "-", "paths": [ { "guard": "-", "path": "/image", "method": "GET", "process": "flows.utils.image", "in": ["$query.name"], "comments": "请求地址:http://127.0.0.1:5099/api/utils/image?name=/20230412/CA2E83A496E0D7D0B44E018EF368DD9C.jpg", "out": { "status": 200, "headers": { "Content-Disposition": "{{$query.name}}" } } } ] }
然后在 flows.utils.image处理器中写入以下内容
flows.utils.image
{ "label": "下载", "version": "1.0.0", "description": "下载", "nodes": [ { "name": "数据", "process": "fs.system.Download", "args": ["{{$in.0}}", false] } ], "output": "{{$res.数据.content}}" }
然后请求地址 http://127.0.0.1:5099/api/utils/image?name=/20230412/CA2E83A496E0D7D0B44E018EF368DD9C.jpg 就可以正常显示图片了
http://127.0.0.1:5099/api/utils/image?name=/20230412/CA2E83A496E0D7D0B44E018EF368DD9C.jpg
Sorry, something went wrong.
No branches or pull requests
比如 /api/news/search 就像这种接口。返回的avatar头像这个字段的值:"avatar":["/api/__yao/form/news/download/fields.form.%E5%9B%BE%E6%A0%87?name=/20230324/CFF7A5748688FB54C99A7BB31448A7D1.png"], 是这样的?怎么处理成可以让小程序端直接显示的值?完全不知道从哪里下手
The text was updated successfully, but these errors were encountered: