I have a DAL table that contains an upload field. After a user fills in the
form and selects a file via the "Choose File" button, I want to display the
form the just filled out but not in an editable form. So I have a
controller/view pair called "view_the_form"
In view_the_form.html I want to have a link so the user could download that
previously 'uploaded' file. I can't seem to get a valid link.
I've been trying variations on the following:
{{=A(T("Brochure"), _href=URL('appname','uploads',row.brochure))}}
Where "row.brochure" is the selected row from my db.table and brochure is
the name of the upload field. I can see that row.brochure is correct, it
contains the name of the file that is in the uploads directory. But, when I
click on that link in the browser, I get an "invalid function
(default/uploads)" message. The URL that is attempted is:
http://127.0.0.1:8000/uploads/sites.brochure.befaec15341b61de.6261636b67726f756e642e6a7067.jpg
Can someone help me figure out how to provide a link to an attachment in my
db.table when viewing the table in a non-form format?
Thanks
Steven
--
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.