Duplicate File extension 'aac' is not valid for audio

rdn

Well-known member
Affected version
XenForo Media Gallery 2.2.4
I added aac on XFMG admin options "Allowed audio extensions".
But still cannot upload a file with that extension on XMG.

PHP:
UnexpectedValueException: File extension 'aac' is not valid for audio src/addons/XFMG/Attachment/Media.php:232
Generated by: AdminUser Aug 17, 2022 at 7:13 AM

Stack trace
#0 src/addons/XFMG/Service/Media/Creator.php(256): XFMG\Attachment\Media->onAssociation(Object(XFMG\XF\Entity\Attachment), Object(TTG\PublicAttachment\XF\Entity\MediaItem))
#1 src/XF/Service/ValidateAndSavableTrait.php(42): XFMG\Service\Media\Creator->_save()
#2 src/addons/XFMG/Pub/Controller/Media.php(884): XFMG\Service\Media\Creator->save()
#3 src/XF/Mvc/Dispatcher.php(352): XFMG\Pub\Controller\Media->actionSaveMedia(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XFMG:Media', 'SaveMedia', Object(XF\Mvc\RouteMatch), Object(MaZ\AMP\Compat\XFMG\Pub\Controller\Media), NULL)
#5 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(MaZ\AMP\Compat\XFMG\Pub\Controller\Media), NULL)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#8 src/XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state
array(4) {
  ["url"] => string(17) "/media/save-media"
  ["referrer"] => string(54) "https://xf2.co/media/albums/test-upload.123/add"
  ["_GET"] => array(1) {
    ["/media/save-media"] => string(0) ""
  }
  ["_POST"] => array(8) {
    ["_xfToken"] => string(8) "********"
    ["attachment_hash"] => string(32) "d71f88d0c03a999cfc5323c4d8c97e93"
    ["attachment_hash_combined"] => string(91) "{"type":"xfmg_media","context":{"album_id":123},"hash":"d71f88d0c03a999cfc5323c4d8c97e93"}"
    ["media"] => array(1) {
      [10448] => array(7) {
        ["title"] => string(11) "sample3.aac"
        ["description"] => string(0) ""
        ["tags"] => string(0) ""
        ["temp_media_id"] => string(5) "10448"
        ["media_hash"] => string(32) "4b16648d0fe8936f01996cd8a068452b"
        ["media_type"] => string(5) "audio"
        ["attachment_id"] => string(7) "2092012"
      }
    }
    ["album_id"] => string(4) "123"
    ["_xfRequestUri"] => string(34) "/media/albums/test-upload.123/add"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Top Bottom