Revert "Renamed funtion file() to send_file() because file is a reserved"

This reverts commit 4cf68a4e3d.
This commit is contained in:
pcdinh 2016-10-25 15:59:27 +07:00
parent 8fe75ed63d
commit 0deecd6a4e

View File

@ -153,7 +153,7 @@ def html(body, status=200, headers=None):
content_type="text/html; charset=utf-8")
async def send_file(location, mime_type=None, headers=None):
async def file(location, mime_type=None, headers=None):
filename = path.split(location)[-1]
async with open_async(location, mode='rb') as _file: