0

I am trying to upload MP3 files for a site running EE 4.3.8. When I upload via FTP and sync it in file manager I get the following error:

The file type you are attempting to upload is not allowed.

Would appreciate some help on this.

0

Have you tried uploading it via a file or Asset field, or the file manager?

https://docs.expressionengine.com/latest/development/legacy/libraries/mime-type.html

Looking at this leads me to this file:

system/ee/legacy/config/mimes.php

which leads me to:

system/ee/EllisLab/ExpressionEngine/Config/mimes.php

which has a whitelist of mime types the upload class will allow. I do see these lines in the whitelist:

'audio/mpeg', // .mp2, .mp3, .mpga
'audio/mpg', // .mp3

I'm not sure if the file sync is using that whitelist or not (one would assume it is), but check that list and try uploading via the Control Panel and not via S/FTP.

If it is a specific MP3 file and not others, try and make other services recognize the mime type as audio/mpeg or audio/mpg.

| improve this answer | |
  • Here is what my mime.php file looks like: $whitelist = ee()->config->loadFile('mimes'); The rest is empty so I add the following below it: 'audio/mpg', // .mp3 And I still get the error message: Cannot upload file. File not allowed. – forrest Apr 29 '19 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.