You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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,
Add settings.OSS_MEDIA_LOCALTION = '/media/'
Add settings.OSS_STATIC_LOCALTION = '/static/'
For private acl bucket, use signed_url
For public / public-read acl buckets, use MEDIA_URL or STATIC_URL when available, otherwise fallback to standard oss url.
The pull request #16 is based on pull request #10 from @jxltom, which added public, public-read acl support.
The text was updated successfully, but these errors were encountered:
favoyang
changed the title
Proposal to make django-oss-storage works with aliyun CDN
Proposal to make django-oss-storage work with aliyun CDN
May 16, 2018
The current implementation assigns
OssMediaStorage.location
fromsettings.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,
settings.OSS_MEDIA_LOCALTION = '/media/'
settings.OSS_STATIC_LOCALTION = '/static/'
MEDIA_URL
orSTATIC_URL
when available, otherwise fallback to standard oss url.The pull request #16 is based on pull request #10 from @jxltom, which added public, public-read acl support.
The text was updated successfully, but these errors were encountered: