Skip to content

Django backends storages for Aliyun OSS 阿里云 开放存储服务

License

Notifications You must be signed in to change notification settings

cyanideio/django-aliyun-oss

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-aliyun-oss

Django backends storages for Aliyun OSS

嵌入了Aliyun OSS Python SDK开发包 0.4.6

================= 配置说明:

编辑settings.py

  1. DEFAULT_FILE_STORAGE = 'aliyun_oss.backends.oss.OSSStorage'

  2. OSS_ACCESS_URL 阿里云存储访问地址

杭州节点外网:oss.aliyuncs.com
              oss-cn-hangzhou.aliyuncs.com
青岛节点外网:oss-cn-qingdao.aliyuncs.com
杭州节点内网:oss-internal.aliyuncs.com   
              oss-cn-hangzhou-internal.aliyuncs.com
青岛节点内网:oss-cn-qingdao-internal.aliyuncs.com
  1. OSS_ACCESS_KEY_ID 阿里云OSS KeyID String类型

  2. OSS_SECRET_ACCESS_KEY OSS Secret String类型

  3. OSS_STORAGE_BUCKET_NAME BUCKET名

  4. OSS_HEADERS(optional) 公共Response HEADER

OSS_HEADERS = {
    'Cache-Control': 'max-age=31536000',
}
  1. OSS_DEFAULT_ACL(optional) 文件访问权限 默认 'public-read'

About

Django backends storages for Aliyun OSS 阿里云 开放存储服务

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%