Merge pull request #733 from ashleysommer/file_stream

Add file_stream response handler
This commit is contained in:
Raphael Deem
2017-05-19 16:48:12 -07:00
committed by GitHub
4 changed files with 174 additions and 2 deletions

View File

@@ -37,6 +37,10 @@ async def test_await(request):
async def test_file(request):
return await response.file(os.path.abspath("setup.py"))
@app.route("/file_stream")
async def test_file_stream(request):
return await response.file_stream(os.path.abspath("setup.py"),
chunk_size=1024)
# ----------------------------------------------- #
# Exceptions