Refactored file storage code slightly to allow multiple download URLs
This commit is contained in:
parent
271dc266fa
commit
d31de0937f
11 changed files with 78 additions and 35 deletions
|
@ -10,7 +10,7 @@ class Application_Common_FileIO
|
|||
*
|
||||
* This HTTP_RANGE compatible read file function is necessary for allowing streaming media to be skipped around in.
|
||||
*
|
||||
* @param string $filePath - the full filepath pointing to the location of the file
|
||||
* @param string $filePath - the full filepath or URL pointing to the location of the file
|
||||
* @param string $mimeType - the file's mime type. Defaults to 'audio/mp3'
|
||||
* @param integer $size - the file size, in bytes
|
||||
* @return void
|
||||
|
@ -22,8 +22,7 @@ class Application_Common_FileIO
|
|||
{
|
||||
$fm = @fopen($filePath, 'rb');
|
||||
if (!$fm) {
|
||||
header ("HTTP/1.1 505 Internal server error");
|
||||
return;
|
||||
throw new FileNotFoundException($filePath);
|
||||
}
|
||||
|
||||
//Note that $size is allowed to be zero. If that's the case, it means we don't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue