I build a new simple application "test" with

test/models/db.py:
--------------------------------------------------------
db = DAL('sqlite://storage.sqlite')

db.define_table('data',
    Field('file','upload'))
----------------------------------------------------------

test/controllers/default/index.py:
-----------------------------------------------------------
def index():
    rows = db().select(db.data.ALL,orderby=db.data.id)
    return dict(rows=rows)
    
def download():
    return response.download(request, db)
------------------------------------------------------------

test/views/default/index.htm:
------------------------------------------------------------------
{{extend 'layout.html'}}
{{=URL('download', args=rows[0].file)}}<br />
{{=IMG(_src=URL('download', args=rows[0].file))}}<br />
{{=URL('download', args=rows[1].file)}}<br />
{{=IFRAME(_src=URL('download', args=rows[1].file), _width='100%')}}
-------------------------------------------------------------------

I populate the db with data 

When I start firefox with "127.0.0.1:8000/test", 
I get the URLs, the image and an iframe window, but the html-text fails to 
appear in it.
firefox says:"You have chosen to open:'test.html'
and asks: 'What should Firefox do with this file?"


**how do I get the uploaded html-text into the window?**



-- 

--- 
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/groups/opt_out.


Reply via email to