Notifications
Clear all

[Solved] Uploading file type error

23 Posts
4 Users
1 Reactions
2,753 Views
Posts: 12
 LT
Topic starter
(@lanetownsend)
Active Member
Joined: 5 years ago

Since the update to 7.0.3, the Media Uploader addon does not allow any user to upload a file with the m4a extension. Upon attempting to do so, I get the default "Not allowed file type" message.

I have tried disabling my caching plugin, enabling and disabling all file extensions listed (followed by save & refresh), as well as disabling & enabling the plugin altogether, but the error persists.

Audio files of mp3 extension upload without a problem, but m4a files do not. What can I do to get this working again?

22 Replies
Elvina
Posts: 1403
(@elvina)
Support
Joined: 5 years ago

Hi @lanetownsend,

We've just tested and don't find such an issue on our test website, the m4a extension works properly.

Please send the admin login details to info[at]gvectors.com email address. The developers check it for you.

Elvina
Posts: 1403
(@elvina)
Support
Joined: 5 years ago

Hi @lanetownsend,

Please put the following code in the current active theme functions.php file

add_filter("upload_mimes", function ($t, $u) {
if (empty($t["m4a"])) {
$t["m4a"] = "audio/x-m4a";
}
return $t;
}, 10, 2);

Once you add a code provided above, in the Allowed File Types option will appear the new checkbox(m4a), you just need to enable it.

5 Replies
 LT
(@lanetownsend)
Joined: 5 years ago

Active Member
Posts: 12

Thanks, @elvina -

Looks like that worked, thank you very much. Is there some reason the mp3|m4a|m4b option that's originally included in the checklist doesn't work for me?

Also, will I need to keep that snippet long term or will this be included in a subsequent update?

Thanks again.

 LT
(@lanetownsend)
Joined: 5 years ago

Active Member
Posts: 12

Quick follow up: the m4a file uploads with the post, but does not show the player, only the text link. Any way to fix that?

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

@lanetownsend,

Also, will I need to keep that snippet long term or will this be included in a subsequent update?

Yes, for now, please keep the code snippet. We will update the topic once we get news about it.

Quick follow up: the m4a file uploads with the post, but does not show the player, only the text link. Any way to fix that?

Please leave the exact URL with the issue to allow us to check it.

Customer
(@florian-kick)
Joined: 4 years ago

Member
Posts: 6

@elvina

I have a similar problem: some files are blocked with error "this file type is not allowed" even though the types are selected in the allowed file types setting.
The file types are:

  • wav
  • aac

I tried the above fix with additional if blocks for wav and aac but that didn't help.

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

@florian-kick,

We are going to check it. Please wait a bit I'll update the topic as soon as possible.

Elvina
Posts: 1403
(@elvina)
Support
Joined: 5 years ago

Hi @florian-kick,

It will be fixed in the next version update.

To solve it as soon as possible, please put the following code in the current active theme functions.php file:

add_filter("upload_mimes", function ($t, $u) {
$t["wav"] = "audio/x-wav";
$t["aac"] = "audio/x-hx-aac-adts";
return $t;
}, 10, 2);

Then in the add-on settings, go to the   Allowed File Types option and make sure the above-mentioned types are checked and check again.

14 Replies
Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina

It looks like this is still an issue. This script did not work, despite updating the allowed file types. Any other ideas? (Or an ETA on the fix?)

Thanks!

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

@david-cloutier,

This is already fixed. You just need to update the wpDiscuz Media Uploader add-on to the latest version(v.7.0.6) and check again.

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina Thanks - to clarify, that is the version I’m running. I reinstalled it yesterday just in case. Still have the issue.

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina For the end of providing a little more context, I can upload no problem to Media in the WordPress Dashboard. When using the Media Uploader frontend, I get the red "Not allowed file type" box.

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

@david-cloutier,

Please let us know the type you can't upload? Also, please leave the error message here.

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina Any file I've tried – MP4. PNG. JPG. The server upload limit is well within specs as well. I have tried as an admin and as a regular user.

Screen Shot 2020 08 29 at 7.46.59 AM

 "Not Allowed file type"

 

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina I have privately emailed (using the contact form) my site information and a login. Thanks for any insight you can offer.

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

Hi @david-cloutier,

Please leave the email subject here to allow us to easily find it.

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina I filled out the form, so I don't have the header - it didn't send a receipt - but you can search by my last name or by my email, which is consulting {at} david cloutier DOT com and you should get it. Do you have an ETA for when you'll be able to look at this? I need comment uploads, so my alternative is to turn this off for a few days and go with an alt plugin until then. If you can take a peek before your end of day, I'd so appreciate it. Thanks!

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina In case you did not receive it last day, I also just emailed it now. The subject is "Uploading error re: file type".

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina

In order to get the site working for members, I temporarily enabled DCO Media Upload and classic comments, and I deactivated wpDiscuz, and wpDiscuz Media Uploader. You are welcome to re-enable them to test this issue for yourself (I ask you disable them again if it isn't a quick fix). Thanks!

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

@david-cloutier,

Please try to deactivate the wpDiscuz plugin, delete it then activate it, and check again.

Customer
(@david-cloutier)
Joined: 4 years ago

Member
Posts: 10

@elvina That did it! Thanks so much!

Elvina
(@elvina)
Joined: 5 years ago

Support
Posts: 1403

@david-cloutier,

Glad to hear the issue is solved.

Share:
Scroll to top