Skip to content
This repository
Browse code

Add link to french translation, add "problem" and "solution" for cook…

…book-like forma
  • Loading branch information...
commit 9c46f585c204d1adf2cbd09fc4226f794c55c342 1 parent 9dfc73c
nux authored anandology committed

Showing 1 changed file with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. +9 1 cookbook/streaming_large_files.md
10 cookbook/streaming_large_files.md
Source Rendered
@@ -5,12 +5,20 @@ title: How to Stream Large Files
5 5
6 6 # How to Stream Large Files
7 7
  8 +Other languages: [français](/../cookbook/streaming_large_files/fr) | ...
  9 +
  10 +## Problem:
  11 +
  12 +You want to use web.py to stream large files.
  13 +
  14 +##Solution:
  15 +
8 16 This is an example of how you can use web.py to stream large files. You'll find it DOES work as advertised, but you need to make sure you add the Transfer-Encoding chunked header for it to display properly. Otherwise the browser will buffer all data before displaying it to you.
9 17
10 18 You can't mix basic string and Yield returns in the same method. If you use Yield, you'll have to use yield for everything because your function becomes a generator.
11 19
12 20
13   -Simple Example
  21 +##Simple Example:
14 22
15 23 # Simple streaming server demonstration
16 24 # Uses time.sleep to emulate a large file read

0 comments on commit 9c46f58

Please sign in to comment.
Something went wrong with that request. Please try again.