刘凡 9ff4d1d109 add S3,archive,truncate 2 rokov pred
..
templates 9ff4d1d109 add S3,archive,truncate 2 rokov pred
.gitignore 9ff4d1d109 add S3,archive,truncate 2 rokov pred
LICENSE 9ff4d1d109 add S3,archive,truncate 2 rokov pred
README.md 9ff4d1d109 add S3,archive,truncate 2 rokov pred
app.py 9ff4d1d109 add S3,archive,truncate 2 rokov pred
config.py 9ff4d1d109 add S3,archive,truncate 2 rokov pred
requirements.txt 9ff4d1d109 add S3,archive,truncate 2 rokov pred
tools.py 9ff4d1d109 add S3,archive,truncate 2 rokov pred

README.md

Simple Flask AWS S3 Uploader

Simple and quick AWS S3 upload capability for Flask using Boto3 & env variables

Download and install locally

  1. git clone git@github.com:jelmerdejong/simple-flask-s3-uploader.git
  2. cd simple-flask-s3-uploader
  3. mkvirtualenv simple-flask-s3-uploader
  4. pip install -r requirements.txt

Set local environment variables

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"

Run it!

  1. export FLASK_APP=app.py
  2. flask run