You are here

function upload_download in Drupal 5

Same name and namespace in other branches
  1. 4 modules/upload.module \upload_download()
1 string reference to 'upload_download'
upload_menu in modules/upload/upload.module
Implementation of hook_menu().

File

modules/upload/upload.module, line 252
File-handling and attaching files to nodes.

Code

function upload_download() {
  foreach ($_SESSION['file_previews'] as $file) {
    if ($file->_filename == $_GET['q']) {
      file_transfer($file->filepath, array(
        'Content-Type: ' . mime_header_encode($file->filemime),
        'Content-Length: ' . $file->filesize,
      ));
    }
  }
}