11/05/16 01:41:38.37 m69dgM/G
Streaming Examples
Example 48
It is very easy in web2py to stream large files. Here is an example of a controller that does so:1.
2.
3.
4. def streamer():
import os
path=os.path.join(request.folder,'private','largefile.mpeg4')
return response.stream(open(path,'rb'),chunk_size=4096)
URLリンク(web2py.com)