Yarko - if you are moderating this group, would you mind striking this last post because it shows my raw email. Don't want to be spammed to death.
On Jun 22, 11:34 pm, "richard_gor...@verizon.net" <richard_gor...@verizon.net> wrote: > Continuing this old > thread:http://groups.google.com/group/web2py/browse_thread/thread/59b66b3a24... > > Anybody know why the following code isn't working? I'm trying to > implement almost exactly what Massimo suggested in the previous > thread. Here's my code: > > #controller "audio.py" > def download_audio(): > f=os.path.join(request.folder,'private',request.args(0)) > return response.stream(open(f,'rb')) > > #model "show_audio.py" > def show_audio(): > filename='audio/aab/hello_world.mp3' # this is a hardcoded value > for this test case > url=URL(r=request,c='audio',f='download_audio',args=filename) > return EMBED(_src=url,_autoplay='true') > > #view "index.html" > {{=show_audio()}}