Example #1
0
def download(bID):
    if request.method=="POST":
        file_id = bID
        link = mongoBook.get_link(file_id)
        mongoBook.count_download(file_id)
        webbrowser.open_new_tab(link)
    return redirect(url_for('content_detail', bID=bID))
Example #2
0
def download(bID):
    if request.method == "POST":
        file_id = bID
        link = mongoBook.get_link(file_id)
        mongoBook.count_download(file_id)

    return render_template('download.html', len=len(link), link=link)