Back
sendFile()
1. Send a file for download from the files folder
sendFile(file="wheels_tutorial_20081028_J657D6HX.pdf");
2. Rename the file for the client
sendFile(
file="wheels_tutorial_20081028_J657D6HX.pdf",
name="Tutorial.pdf"
);
3. Send a file located outside the web root
sendFile(
file="../../tutorials/wheels_tutorial_20081028_J657D6HX.pdf"
);
4. Inline display instead of download
sendFile(
file="brochure.pdf",
disposition="inline",
type="application/pdf"
);
5. Delete file after sending
sendFile(
file="temporary_report.xlsx",
deleteFile=true
);
Copied!