Show
Ignore:
Timestamp:
01/19/06 23:45:47 (3 years ago)
Author:
ben
Message:

File uploads / downloads now work again (resolved assumptions about path in $file->location)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_files/download.php

    r146 r147  
    3434                                        $if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']); 
    3535                                         
    36                                         $tstamp = filemtime($file->location); 
     36                                        $tstamp = filemtime(path . $file->location); 
    3737                                        $lm = gmdate("D, d M Y H:i:s", $tstamp) . " GMT"; 
    3838                                         
     
    4848                                         
    4949                                        // Then output some appropriate headers and send the file data! 
    50                                         $mimetype = run("files:mimetype:determine",$file->location); 
     50                                        $mimetype = run("files:mimetype:determine",path . $file->location); 
    5151                                        if ($mimetype == false) { 
    5252                                                $mimetype = "application/octet-stream"; 
     
    6161                                                header('Content-Disposition: attachment'); 
    6262                                        } 
    63                                         readfile($file->location); 
     63                                        readfile(path . $file->location); 
    6464                                 
    6565                        }