1

Как реализовать preview загруженного файла на python, flask? Я могу получать только имя файла, а мне нужен сам файл, картинка, pdf док и т.д

html: Select Document

my file is: {{ file }}

python:

@app.route('/', methods=['GET','POST'])
def profile():
    file = request.form['file']
    print(file)
return render_template('profile.html',file=file)

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Посмотрите другие вопросы с метками или задайте свой вопрос.