这个利用django-swiftbrowser来实现,步骤如下:
参考:https://github.com/cschwede/django-swiftbrowser
效果如下
登陆页(这里使用keystone验证)
登陆以后可以浏览container,继续点击就是object,可以下载、上传、生成tempurl
1、 安装swiftbrowser
pip installdjango-swiftbrowser
2、 配置swift-proxy,确保开启temurl和formpost这两个中间件,验证即可以使用authtoken也可以使用tempauth,配置分别如下:
使用authtoken
[pipeline:main]
pipeline = catch_errors healthcheck cache tempurl formpost authtoken keystone proxy-server
使用tempauth
[pipeline:main]
pipeline = catch_errors healthcheck cache tempurl formpost tempauth proxy-server
其他参考配置项
[root@host-10-10-2-41swift]# vim proxy-server.conf-swiftbrwser-tempauth
use =egg:swift#keystoneauth
operator_roles= admin