files
folder.wheels_tutorial_20081028_J657D6HX.pdf
in that folder, here is a quick example of how you can deliver that file to the user. Let's start with creating a link to the action that will handle the sending of the file first.sendTutorial
controller action. Just like the rendering functions in CFWheels, the sendFile() function should be placed as the very last thing you do in your action code.sendTutorial
action:disposition
argument to inline
.type
argument. Please refer to the API for the sendFile()
function for complete details.ram://
- this is particularly useful when you're dynamically creating files (such as PDF reports) which don't need to be written to the file system.http://www.domain.com/files/wheels_tutorial_20081028_J657D6HX.pdf
in their
browser. Although users would need to guess the file names to be able to access the files, we would still need something more robust as far as security goes.params
struct in this context!