0
Я использую Flask/Heroku и библиотеку Boto. Я хочу, чтобы загруженный файл будет сохранен в моем S3 ...Не удается загрузить файл на Amazon S3 с помощью Boto
@app.route("/step3/", methods = ["GET", "POST"])
def step3():
if request.method == "GET":
return render_template("step3.html")
else:
file = request.files['resume']
if file and allowed_file(file.filename):
filename = secure_filename(file.filename)
k = Key(S3_BUCKET)
k.key = "TEST"
k.set_contents_from_filename(file)
return redirect(url_for("preview"))
но следующие дает мне следующее ...
TypeError: coercing to Unicode: need string or buffer, FileStorage found