T357: Continue restricting lossy user-facing uploads.

This commit is contained in:
Peter Deltchev 2015-09-07 07:35:25 -07:00
parent 05ecc34e12
commit 82dc200f17
2 changed files with 1 additions and 2 deletions

View file

@ -25,7 +25,6 @@
// value is the file array itself
// parameters is a list of formats the file can be, verified via ffmpeg
$file = AudioCache::get($value->getPathname());
var_dump($file->getAudioCodec());
return in_array($file->getAudioCodec(), $parameters);
}

View file

@ -45,7 +45,7 @@
$validator = \Validator::make(['track' => $trackFile], [
'track' =>
'required|'
. $this->_allowLossy ? '' : 'audio_format:'.implode(',', $this->_losslessFormats).'|'
. ($this->_allowLossy ? '' : 'audio_format:'. implode(',', $this->_losslessFormats).'|')
. 'audio_channels:1,2|'
. 'sample_rate:44100,48000,88200,96000,176400,192000|'
. 'min_duration:30'