A
A
Anton Shilov2015-11-10 14:49:45
Yii
Anton Shilov, 2015-11-10 14:49:45

How to implement validation of audio files during download?

In rules I add:

[
    ['fileAudio'], 'file', 'maxSize' => '41943040', 'extensions' => 'mp3, wav, wave, mp3, amr, m4a, 3gpp, 4gpp, 3gp, wma'
]

But the download fails. Everything is fine with images, the rules differ only in extensions. I check on mp3 files.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
totudub, 2015-11-11
@Siggard

[
['fileAudio'], 'file', 'checkExtensionByMimeType' =>false,  'maxSize' => '41943040', 'extensions' => 'mp3, wav, wave, mp3, amr, m4a, 3gpp, 4gpp, 3gp, wma'
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question