-
Couldn't load subscription status.
- Fork 67
Proposal issue 15 #16
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit d9a31ec.
|
This is unnessasry since In detail, the |
|
The point for this push has mentioned in #15 is about to support Aliyun CDN (to save money and get benefit from CDN). In a typical oss+cdn setup,
|
|
Sorry you are right, I missed the CDN part... But is it better to set |
|
Hmm, Django specify MEDIA_URL as the address to serve media file. It's a common setup to use default value I smell using So I decide to use |
|
Using MEDIA_URL to serve both static and media files are very confusing. I believe by introducing a setting such as |
No, A little details
Hence, there's almost no chance to get a static file url via the storage.url method you provide. Then the OSS_CDN_URL is useless. In another word, the static file only use collectstatic to upload file to storage backend (one way communication). Wanna a static file url? Do you work by constructing it using Hope this help. And thanks for the discussion and patch @jxltom. |
|
You updated |
|
Again, good catch, I will see what I can do later. Probably reconsider your You got my idea that keep django convention and intro less new settings. So user can switch from one storage to another storage seamless. |
|
The Anyway, no matter for static or media files, you need to take good care of them in the |
|
Yes, after checking the implementation of static template tag, it will eventually invoke the The default |
|
Very good. But it still breaks the compatibility with older django-oss-storage versions. For uses who are not using CDN and set MEDIA_URL such as I suggest using |
|
@jxltom Thanks for the suggestion. Yes, my approach breaks back compatibility for users who changed Conceptually assign MEDIA_URL to location is a bit confusing, however keep back compatibility means less pain. This logic seems satisfy both of us. Thought? |
|
Nice work. I'm fine with it as long as it doesn't break the backward compatibility and your last approach looks very good so far 😃 |
|
|
Try to fix issue #15. This is based pull request #10 from@jxltom, which added support for public/public-read bucket.