Skip to content
New issue

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

fix: 修复 avatar 配置 #68

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Conversation

crimson-gao
Copy link
Contributor

No description provided.

@crimson-gao
Copy link
Contributor Author

ps: 现在这种头像的链接存储方式仍然不够合适,我觉得应该提供两种头像地址。
一种是存在数据库里的,用户信息里的 url 应该只存后缀 /infra/file/get/xxxxxxx,前缀 http://127.0.0.1:8080/admin-ui 由前端 vue 运行时注入获取,这样后端地址发生变化时, 也能不需要修改数据库条目就可以获取。
另一种 url 就是绝对 url,可以使用网络链接

@YunaiV
Copy link
Owner

YunaiV commented Feb 8, 2022

ps: 现在这种头像的链接存储方式仍然不够合适,我觉得应该提供两种头像地址。 一种是存在数据库里的,用户信息里的 url 应该只存后缀 /infra/file/get/xxxxxxx,前缀 http://127.0.0.1:8080/admin-ui 由前端 vue 运行时注入获取,这样后端地址发生变化时, 也能不需要修改数据库条目就可以获取。 另一种 url 就是绝对 url,可以使用网络链接

第一个问题,可能后续会新增一个 nginx 的配置。也就是说,前端是访问 nginx=》后端的 db 获取;
通过这样的方式,稳定图片的路径

@YunaiV
Copy link
Owner

YunaiV commented Feb 8, 2022

pr 没什么问题,我晚点合并下哈

@YunaiV YunaiV merged commit 5151112 into YunaiV:master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants