I have experimented with this and i think there is something wrong...

*Controllers*:

def index():
     return locals()
def post():
    form = SQLFORM(db.pics, upload=URL('download'))
    if form.process().accepted:
        response.flash = 'Data saved'
    elif form.process().accepted:
        response.flash = 'Error with form'
    return dict(form=form)
def download():
    return response.download(request, db)

Views:

View-
       -albums
                 + index.html

{{extend 'layout.html'}}

{{=A('Upload Picture', component=URL('album','post.load'),
target='photo-space', _class='btn')}}
<div id="photo-space"></div>

                + post.load

{{=form}}

The funny thing is when if i access the post normally and not as a
component the file is being uploaded and but as a component as shown in the
code above, the image is not being uploaded and the database field for
image is empty but the name of the picture is added.

Any thought on this or its by design that its not working!?


-- 
.......................................................................................
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA

Cell: +260 97 7760473
website: http://www.opensource.org.zm

~/
Human Knowledge belongs to the world! - AntiTrust

Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881

/~

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to