
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
用于阿里云 OSS(对象存储服务)的 Django 存储后端。
pip install django5-aliyun-oss
在您的 Django settings.py INSTALLED_APPS 中添加以下设置:
INSTALLED_APPS = [
...
'django5_aliyun_oss',
...
]
在您的 Django settings.py 中添加以下设置:
ALIYUN_OSS = {
'ACCESS_KEY_ID': '您的访问密钥ID',
'ACCESS_KEY_SECRET': '您的访问密钥密码',
'ENDPOINT': '您的终端节点',
'BUCKET_NAME': '您的存储桶名称',
'URL_EXPIRE_SECONDS': 3600, # 可选,默认为3600
}
# 设置为默认存储器
STORAGES = {
'default': {
'BACKEND': 'django5_aliyun_oss.storage.AliyunOSSStorage',
},
'staticfiles': {
'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage',
}
}
from django.db import models
class YourModel(models.Model):
file = models.FileField(upload_to='uploads/')
image = models.ImageField(upload_to='images/')
MIT 许可证
欢迎贡献!请随时提交拉取请求。
FAQs
Django5 storage backend for Aliyun OSS
We found that django5-aliyun-oss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.