there is a function db.mytable.myfield.retrieve(row.myfield)
On Monday, 10 November 2014 10:51:53 UTC-6, LoveWeb2py wrote:
>
> Here is the code in the link:
> db.define_table('music', Field('name',required=True),
> Field('filename','upload',required=True), auth.signature) " >
> applications/audio/models/db_audio.py echo " response.menu =
> [('Home',0,URL('index'))] # allows to browser, search, and upload new music
> (if logged in) def index(): # tell web2py that links to music files are to
> be # represented as HTML5 audio embedded players from
> gluon.contrib.autolinks import expand_one db.music.filename.represent =
> lambda v,r: \ XML(expand_one(URL('download',args=v),{})) return dict(grid =
> SQLFORM.grid(db.music)) # perform login/logout/registration/etc. def
> user(): return dict(form=auth()) # allow streaming of all files, including
> partial content of music files @cache.action() def download(): return
> response.download(request, db) " >
> applications/audio/controllers/default.py
> After a file is uploaded into the DB. How could I access it via a view or
> controller? I tried using the dal, but it doesn't seem to work. Does my
> question make sense?
>
> On Wednesday, November 5, 2014 11:19:17 PM UTC-5, LoveWeb2py wrote:
>>
>> *Hello,*
>>
>> *I'd like to play an audio file in my view once a certain condition is
>> met.*
>>
>> *I'm using Massimo's audio setup (thank you, Massimo!!) found here:*
>>
>> *https://www.reddit.com/r/Python/comments/1r7v23/audio_streaming_app_in_web2py_from_scratch/
>>
>> <https://www.reddit.com/r/Python/comments/1r7v23/audio_streaming_app_in_web2py_from_scratch/>*
>>
>> *How could I stream/play the audio from the database where I uploaded the
>> files. I would post my model/controller but its all in the link above.*
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.