Ejemplo n.º 1
0
def get__remove(user):
    try:
        filename = request.args.get('filename')
        assert filename, 'missing filename'
        File.delete_file(user, filename)
        flash('删除成功!')
    except AssertionError as e:
        message = e.args[0] if len(e.args) else str(e)
        flash('删除失败!'+message)
    return redirect('/file')
Ejemplo n.º 2
0
def get_remove():
    try:
        user = current_user
        fid = request.args.get('fid')
        File.delete_file(user, fid)
        flash('删除成功!')
    except AssertionError as e:
        message = e.args[0] if len(e.args) else str(e)
        flash('删除失败!' + message)
    return redirect('/home')