Removed disk space check from StoredFile. This is now done in the Media controller

This commit is contained in:
drigato 2014-04-16 12:15:34 -04:00
parent 7aba416c3b
commit f5a2e59b6d
1 changed files with 0 additions and 23 deletions

View File

@ -899,19 +899,6 @@ SQL;
return $results;
}
/**
* Check, using disk_free_space, the space available in the $destination_folder folder to see if it has
* enough space to move the $audio_file into and report back to the user if not.
**/
public static function isEnoughDiskSpaceToCopy($destination_folder, $audio_file)
{
//check to see if we have enough space in the /organize directory to copy the file
$freeSpace = disk_free_space($destination_folder);
$fileSize = filesize($audio_file);
return $freeSpace >= $fileSize;
}
/**
* Copy a newly uploaded audio file from its temporary upload directory
* on the local disk (like /tmp) over to Airtime's "stor" directory,
@ -952,16 +939,6 @@ SQL;
Logging::info("Warning: couldn't change permissions of $audio_file to 0644");
}
// Check if we have enough space before copying
if (!self::isEnoughDiskSpaceToCopy($stor, $audio_file)) {
$freeSpace = disk_free_space($stor);
$fileSize = filesize($audio_file);
throw new Exception(sprintf(_("The file was not uploaded, there is "
."%s MB of disk space left and the file you are "
."uploading has a size of %s MB."), $freeSpace, $fileSize));
}
// Check if liquidsoap can play this file
// TODO: Move this to airtime_analyzer
/*