Back to ProMedia Support

scott56276
scott56276

Using the latest version which I just purchased - 2.1.0.

If I go to the video or audio tab and try to upload, it only allows me to select image files. If I drag and drop, it complains that I can't upload files of that type.

ChadStrat
ChadStrat

Sounds like either your app settings or server have file type limitations? You may want to confirm with your web host that said file types are allowed. And then also confirm your app settings comply: https://octobercms.com/forum/post/setting-allowed-filetypes-for-fileupload

scott56276
scott56276

There is no limitation at the httpd level (my server). I've added the stuff in the thread you mentioned, but get the same results.

in cms.php:

...

'fileDefinitions' => [
        'defaultExtensions' => [
            ...
            'mp3',
            'ogg',
            'wav',
            'avi',
            'mov',
            'mp4',
            'mpeg',
        ]
    ],

Last updated

scott56276
scott56276

Interestingly enough, the .mp3 extension (which is what I am trying to upload), is already contained in ./vendor/october/rain/src/Filesystem/Definitions.php.

scott56276
scott56276

Ok, this is a bug as far as I can tell. If I inspect the audio tab's dropzone element, I see this:

Bug

Note the data-file-types show image extensions, not the audio ones.

scott56276
scott56276

./modules/backend/formwidgets/FileUpload.php doesn't seem to use the audioExtensions or videoExtensions arrays, it just checks for a displaymode of image, then falls back to the default list. However, that displayMode/image check returns true when I load/reload the form page, which is why I guess the audio/video tabs are only allowing image uploads.

However, in ./modules/backend/formwidgets/FileUpload.php, if I replace this:

$types = implode(',', FileDefinitions::get($isImage ? 'imageExtensions' : 'defaultExtensions'));

with:

$types = implode(',', FileDefinitions::get('defaultExtensions'));

I can see that my overrides in config/cms.php for defaultExtensions is there, and the form works against it.

Hope that helps!

Last updated

1-6 of 6