aliyun / django-oss-storage

Django storage backends for AliCloud OSS.
MIT License
145 stars 67 forks source link

Proposal to make django-oss-storage work with aliyun CDN #15

Open favoyang opened 6 years ago

favoyang commented 6 years ago

The current implementation assigns OssMediaStorage.location from settings.MEDIA_URL (default value is '/media/'), and use that to construct the OSS URL. This is semi-correct, unless you work with aliyun CDN which use your domain as MEDIA_URL (for example, MEDIA_URL = 'https://files.yourdomain.com/').

Proposal,

The pull request https://github.com/aliyun/django-oss-storage/pull/16 is based on pull request https://github.com/aliyun/django-oss-storage/pull/10 from @jxltom, which added public, public-read acl support.