Lines Matching defs:file
12 * Set headers and send the file to the client
17 * This function will abort the current script when a 304 is sent or file sending is handled
20 * @param string $file local file to send
21 * @param string $mime mime type of the file
25 * @param string $orig original file to send - the file name will be used for the Content-Disposition
32 function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null, $csp = [])
71 $fmtime = @filemtime($file);
74 // Use the current $file if is $orig is not set.
76 $orig = $file;
93 http_sendfile($file);
95 // send file contents
96 $fp = @fopen($file, "rb");
98 http_rangeRequest($fp, filesize($file), $mime);
101 echo "Could not read $file - bad permissions?";
108 * This seems to be needed for file names with e.g. umlauts that
144 * @param string $file reference to the file variable
150 function checkFileStatus(&$media, &$file, $rev = '', $width = 0, $height = 0)
154 //media to local file
161 if (str_starts_with($MIME, 'image/')) $file = media_get_from_URL($media, $EXT, $CACHE);
162 if (!$file) {
180 $file = mediaFN($media, $rev);
183 //check file existance
184 if (!file_exists($file)) {