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

管理端图片上传逻辑 #184

Open
funtask opened this issue May 23, 2019 · 3 comments
Open

管理端图片上传逻辑 #184

funtask opened this issue May 23, 2019 · 3 comments

Comments

@funtask
Copy link

funtask commented May 23, 2019

商品页面upload图片组件上传会直接上传七牛或其它对象存储空间,删除却不会删除空间中的图片只是修改了数据库的路径,会使无用图片增加并难以管理

@linlinjava
Copy link
Owner

你可以看core模块的storage包的QiniuStorage类,里面实现了delete方法。
当然由于没有账号,这里没有测试过,你可以调试测试看看代码逻辑。
如果有问题,欢迎贡献的你的pr,谢谢

@funtask
Copy link
Author

funtask commented May 24, 2019

服务端确实有删除的方法,但是这个主要是前端逻辑问题。图片的上传删除管理在对象存储页面完成,编辑与其他选择图片时不上传,可以打开类似淘宝的图片空间,选择已上传的图片。

@linlinjava
Copy link
Owner

你的意思是图片管理这里做一个比较好的管理效果是吗,现在可能只会先这样吧,对于我而言这里可以了。
你可以自己完善一下,当然能够帮忙pr那更好了。

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

No branches or pull requests

2 participants