From 8fe75ed63d6e018d8902cc317653d1eef0efd692 Mon Sep 17 00:00:00 2001 From: pcdinh Date: Tue, 25 Oct 2016 15:58:19 +0700 Subject: [PATCH] Revert "Changed file() to send_file()" This reverts commit 01708502d822d0c98547cf8cbb421dc8230fcd2f. --- sanic/static.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sanic/static.py b/sanic/static.py index f788b06d..7c3a529f 100644 --- a/sanic/static.py +++ b/sanic/static.py @@ -4,7 +4,7 @@ from re import sub from time import strftime, gmtime from .exceptions import FileNotFound, InvalidUsage -from .response import send_file, HTTPResponse +from .response import file, HTTPResponse def register(app, file_or_directory, uri, pattern, use_modified_since): @@ -50,7 +50,7 @@ def register(app, file_or_directory, uri, pattern, use_modified_since): return HTTPResponse(status=304) headers['Last-Modified'] = modified_since - return await send_file(file_path, headers=headers) + return await file(file_path, headers=headers) except: raise FileNotFound('File not found', path=file_or_directory,