使用烧瓶可以播放保存在数据库中的视频吗?

时间:2018-01-06 16:47:16

标签: python

我将文件保存在数据库中,并希望在浏览器中播放。视频文件的数据保存在LargeBinary列中。以下是我在检索视频后试图播放视频的部分:

@app.route('/play/')
def friends():
    file_data = Videos.query.filter_by(id=1).first()
    a = send_file(file_data.data, attachment_filename='video.mkv')

    return render_template('seprate_ep.html', video=a)

在HTML文件中,我刚刚引用了视频你对此的看法:

<video src="{{ video }}"></video>

我怎样才能让它发挥作用?

0 个答案:

没有答案