Re: [web2py] Displaying Uploaded PDF Documents

2019-03-02 Thread mostwanted
I apologize for that oversight, i fixed my controller to: def viewer(): row = db(db.pdfs.id==request.args(0)).select(db.pdfs.fileS).first() redirect(URL('static','pdfs',args=row.fileS)) I figured out my mistake, i didnt have a function that called the database details so my link had an

Re: [web2py] Displaying Uploaded PDF Documents

2019-03-01 Thread Christian Varas
Your model says: db.define_table('*pdfs')* And you controller points to another table (db.*pdfDocs)* Your controller should be *CONTROLLER CODE* def viewer(): row = db(db.*pdfs*.id ==request.args(0)).select(db.*pdfs*.fileS).first()

Re: [web2py] Displaying Uploaded PDF Documents

2019-03-01 Thread mostwanted
I am attempting Bruno's above code to display the saved PDF, i have created a link in my index page that takes me to the viewer page but when i click it i get an error message below: 'NoneType' object has no attribute 'fileS' * MODEL CODE:* db.define_table('pdfs',

[web2py] Displaying Uploaded PDF Documents

2010-12-14 Thread azarkowsky
In my web2py application I'm allowing users to upload PDF documents (via an upload field) and then on another page I provide a download link, however, I think because of the file renaming security feature these PDF documents are truly being downloaded again (saved locally to each user's desktop)

Re: [web2py] Displaying Uploaded PDF Documents

2010-12-14 Thread Bruno Rocha
For security reasons, web2py does not expose the 'uploads' folder to the user, this folder can be accessed only by the 'download' function. You can do that: change the upload folder with 'uploadfolder' parameter. model db.define_table('pdfs',