mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 14:37:59 +01:00
T357: Continue restricting lossy user-facing uploads.
This commit is contained in:
parent
05ecc34e12
commit
82dc200f17
2 changed files with 1 additions and 2 deletions
|
@ -25,7 +25,6 @@
|
||||||
// value is the file array itself
|
// value is the file array itself
|
||||||
// parameters is a list of formats the file can be, verified via ffmpeg
|
// parameters is a list of formats the file can be, verified via ffmpeg
|
||||||
$file = AudioCache::get($value->getPathname());
|
$file = AudioCache::get($value->getPathname());
|
||||||
var_dump($file->getAudioCodec());
|
|
||||||
return in_array($file->getAudioCodec(), $parameters);
|
return in_array($file->getAudioCodec(), $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
$validator = \Validator::make(['track' => $trackFile], [
|
$validator = \Validator::make(['track' => $trackFile], [
|
||||||
'track' =>
|
'track' =>
|
||||||
'required|'
|
'required|'
|
||||||
. $this->_allowLossy ? '' : 'audio_format:'.implode(',', $this->_losslessFormats).'|'
|
. ($this->_allowLossy ? '' : 'audio_format:'. implode(',', $this->_losslessFormats).'|')
|
||||||
. 'audio_channels:1,2|'
|
. 'audio_channels:1,2|'
|
||||||
. 'sample_rate:44100,48000,88200,96000,176400,192000|'
|
. 'sample_rate:44100,48000,88200,96000,176400,192000|'
|
||||||
. 'min_duration:30'
|
. 'min_duration:30'
|
||||||
|
|
Loading…
Reference in a new issue