刘凡 9ff4d1d109 add S3,archive,truncate | 2 anni fa | |
---|---|---|
.. | ||
templates | 2 anni fa | |
.gitignore | 2 anni fa | |
LICENSE | 2 anni fa | |
README.md | 2 anni fa | |
app.py | 2 anni fa | |
config.py | 2 anni fa | |
requirements.txt | 2 anni fa | |
tools.py | 2 anni fa |
Simple and quick AWS S3 upload capability for Flask using Boto3 & env variables
git clone git@github.com:jelmerdejong/simple-flask-s3-uploader.git
cd simple-flask-s3-uploader
mkvirtualenv simple-flask-s3-uploader
pip install -r requirements.txt
Open your environments postactive file (nano $VIRTUAL_ENV/bin/postactivate
) and add the following lines:
cd ~/Projects/simple-flask-s3-uploader
export APP_SETTINGS="config.DevelopmentConfig"
export SECRET_KEY="your-random-secret-key"
export S3_BUCKET="your-bucket-name"
export S3_KEY="your-aws-secret-key"
export S3_SECRET_ACCESS_KEY="your-aws-secret-access-key"
export FLASK_APP=app.py
flask run