flask文件存储器扩展
Project description
flask-saved
flask-saved是一个flask的存储扩展
使用方式
pip install Flask-Saved
from flask_saved import Storage
storage = Storage(app) or storage = Storage.init_app(app)
storage.save(file)
目前实现了local(本地) oss(阿里云)的存储方式
local 配置项
STORAGE_LOCAL_BASE_PATH
说明:
本地存储基本的路径
比如 upload 目录
STORAGE_LOCAL_BASE_PATH = 'upload'
相对路径。。相对与当前应用的目录
STORAGE_LOCAL_BASE_PATH = '../upload'
相对路径。。相对与当前应用目录的上层目录
STORAGE_LOCAL_BASE_URL
说明:
本地存储基本url
STORAGE_LOCAL_BASE_URL = 'http://picture.domain.com'
oss 配置项
STORAGE_OSS_ACCESS_KEY
STORAGE_OSS_SECRET_KEY
STORAGE_OSS_ENDPOINT
STORAGE_OSS_BUCKET
STORAGE_OSS_CNAME
STORAGE_OSS_DOMIAN
STORAGE_OSS_BASE_PATH
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Flask-Saved-1.0.6.tar.gz
.
File metadata
- Download URL: Flask-Saved-1.0.6.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72a58006ba282f1a394a0195e29666ac08d69217e06898273167579aa249ac00 |
|
MD5 | 25f127b3635c2861c55768a0d96e55ee |
|
BLAKE2b-256 | aac7fadceb25ff403990e8798efa968cd7b3e3dcc33c3ec37ba90011c67229c9 |