glasslion / django-qiniu-storage

Django storage for 七牛云存储
MIT License
190 stars 70 forks source link

Fix the issue that 'media' appears twice in url #9

Closed yaozhifeng closed 9 years ago

yaozhifeng commented 9 years ago

Since name of FileField contains the 'media' prefix, I modified the _normalize_name function, so that while the name starts with 'location'+'/', we don't add 'location' to the result. The url appears correct this way.

glasslion commented 9 years ago

谢谢你提交这个 bug. 但真正的问题不是出在 _normalize_name 这个方法上, 而是 storage.save() 返回的name不应该带上 location