In my app I have a module named “client”. I wish to create a sub directory “statements” and below that “accounts” then “account_123” and within this directory the pdfs representing statements for clint 123.
Structure client then statements then accounts then acount_XXX and the pdf files.
The problem
<a href=What_is_the_url_for">statement_1.pdf</a>?
Being MVC I am making little progess.
I moved the structure to public and it almost wotk except I could not retrieve dynamically the hostname i.r. http://www.hostnam.com/client/statement….
I know this is a security issue so I have moved the directory back yo below the client module.
Any help will be appreciayed.
TIA Ephraim
As far as I know you can’t place a direct link to a file placed under ‘application’ director (because of security issues as you already wrote), so one of possible solution is to make an action which read the content of a file and return it in a response object.
When user click a link to this action user get a window to open/save provided file.
Example:
I put in above code some constants because its values depends on your application.