David, Show an Active4D page that only displays their invoices.
Within that page the download link are also an Active4D page. You will have to provide some type of document identifier e.g., www.mysite.com/user_downloads.a4d?docid=KZv1r9WloBX73RV Active4D serves the document. I don't have code handy to show you how to do that but I think there might be an example in the Active4D documents (it might have been for serving images on the fly, but the same concept applies). IIRC you set a response header that will result in a download, read the file from disk and stream it to the user. If you are really worried about exposing any identifying information you could generate random IDs for each document prior to displaying their allowed downloads page. Store them in the users session, and have the session data associate them with the actual document. Expose the random session ID in the download URL. On request get the document's actual document ID from the session and serve as noted above. hth, Brad Perkins ________________________________________ From: [email protected] [[email protected]] on behalf of David Wright [[email protected]] Sent: Sunday, March 09, 2014 12:32 PM To: Active4D Developer Discussion List Subject: [Active4d-dev] PDF security Hi all, Using 4D Server 12.5 with Active4D v5.0r17, proxy pages fronted by an Apache web server. I need to allow logged-in clients to download their invoices in PDF format without being able to see the URL path to the documents, so that I can control which invoices they can and cannot download. The PDF files are stored on the 4D Server in the web file structure. What is the best way to achieve this please? Thanks David Wright _______________________________________________ Active4D-dev mailing list [email protected] http://list.aparajitaworld.com/listinfo/active4d-dev Archives: http://active4d-nabble.aparajitaworld.com/ _______________________________________________ Active4D-dev mailing list [email protected] http://list.aparajitaworld.com/listinfo/active4d-dev Archives: http://active4d-nabble.aparajitaworld.com/
