Back
sendFile()
Sends a file to the user (from the files
folder or a path relative to it by default).
// Send a PDF file to the user
sendFile(file="wheels_tutorial_20081028_J657D6HX.pdf");
// Send the same file but give the user a different name in the browser dialog window
sendFile(file="wheels_tutorial_20081028_J657D6HX.pdf", name="Tutorial.pdf");
// Send a file that is located outside of the web root
sendFile(file="../../tutorials/wheels_tutorial_20081028_J657D6HX.pdf");
// Send a file that is located in ram://
sendFile(file="ram://wheels_tutorial_20081028_J657D6HX.pdf");
Copied!