NeedI need a function in my module for users to download a file from a private filesystem.
$file : "private://sample.csv"
Which function should be used:, file_download()
, or file_transfer($uri, $headers);
?
function file_download_page() {
$file = "private://sample.csv";
//code for downloaddownloading $file
}
Please provide a sample code.
Thank you