July 2019
Beginner to intermediate
302 pages
9h 38m
English
Now, make some changes to our existing catalog application to accommodate support for file upload and retrieval from S3:
app.config['AWS_ACCESS_KEY'] = 'Amazon Access Key' app.config['AWS_SECRET_KEY'] = 'Amazon Secret Key' app.config['AWS_BUCKET'] = 'Your S3 Bucket Name'
from boto3
This is the import that we need from boto. Next, we need to replace the following line in create_product():
image.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
This will be replaced with the following ...