при загрузке файла из браузера.имя файла создается в корзине s3, но содержимое файла пусто.
@app.route("/", methods=['GET', 'POST'])
def index():
if request.method == 'POST':
file = request.files['file']
file.filename = time.strftime("%Y%m%d-%H%M%S") ## filename=TIMESTAMP
# Read the contents of the file
file_contents = file.open()
s3.Object('mybucket', file.filename).put(file_contents)
# Connect to s3 bucket
s3=boto3.resource('s3')
return render_template('index.html')