Skip to main content

# Django Aliyun OSS2 Storage

### Django storage for [阿里云 OSS2](https://www.aliyun.com/product/oss/?spm=5176.383338.201.42.WB7sGd)

## Install

pip install django-aliyun-oss2-storage

## Configurations

Django Aliyun OSS2 Storage 需要以下几个配置才能正常工作。这些配置通过可以环境变量或 settings.py 来设置。环境变量的优先级要高于 settings.py 。BUCKET_NAME`是Bucket的名字,如果该bucket不存在,程序会自动创建。`BUCKET_ACL_TYPE`用于设置Bucket的权限,可以设置为`private, public-read`和 `public-read-write

`python ACCESS_KEY_ID = "40ZhE1HyuWdllpMh" ACCESS_KEY_SECRET = "KbxtlKSvKyuyuymTiQvrxhsYFMguXy" END_POINT = "oss-us-west-1.aliyuncs.com" BUCKET_NAME = "XXXX" BUCKET_ACL_TYPE = "private" # private, public-read, public-read-write `

## Usage

在 settings.py 里设置 DEFAULT_FILE_STORAGE :

`python # mediafile将自动上传 DEFAULT_FILE_STORAGE = 'aliyun_oss2_storage.backends.AliyunMediaStorage' # staticfile将自动上传 STATICFILES_STORAGE = 'aliyun_oss2_storage.backends.AliyunStaticStorage' `

## License

基于MIT许可证发布

Release files for django-aliyun-oss2-storage 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-aliyun-oss2-storage 0.1.5
File Size Uploaded
django-aliyun-oss2-storage-0.1.5.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-aliyun-oss2-storage 0.1.5
File Interpreter ABI Platform
django_aliyun_oss2_storage-0.1.5-py2.7.egg Legacy Egg format - - Details

Total release size: 14.5 kB

Release files / django-aliyun-oss2-storage-0.1.5.tar.gz

Download URL django-aliyun-oss2-storage-0.1.5.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8de84c1ee2dea1e50937155c5f47834e44676a8b1d2e61c645e6ad255ca49d79
BLAKE2b-256 checksum
How to use checksums
cd59e22479bac1c97ba9af8b7ce6e3723cd4eea420a8715aa58ac49d631b9604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_aliyun_oss2_storage-0.1.5-py2.7.egg

Download URL django_aliyun_oss2_storage-0.1.5-py2.7.egg
Size 9.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
71f6451a9f8d3ebb091335cc713ff4b5294553f1669ffce2d0cea8ca72a3ae90
BLAKE2b-256 checksum
How to use checksums
619d206a9d36e3fe96c7a626a9daabf9040f5c27dbb92895fe4deabfc4fea59b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page