WordPress.org

Ready to get started?Download WordPress

Forums

File Type not permitted - Word .doc file (12 posts)

  1. tamalita
    Member
    Posted 3 years ago #

    I have a WordPress installation that is working fine. It's actually a multisite, but I'm not sure if that is causing the problem.

    When I try to upload a Word document (.doc) I get an error alert:

    [code]Sorry, this file type is not permitted for security reasons[code]

    I had never encountered this and first checked with my hosting. They told me about the mime types in functions.php -- so I looked there, and .doc files are enabled ....

    So I am not sure why I am getting this error? Or what to do about it.

  2. It's WordPress and it's by design.

    WordPress only lets you upload images (png, gif, jpg, pdf, etc).

    This plugin may help: http://wordpress.org/extend/plugins/pjw-mime-config/

  3. tamalita
    Member
    Posted 3 years ago #

    ok thank you. I thought that because the mime type is already enabled in the functions.php that it would be ok .... but I will definitely check this out. thank you.

  4. It must not be enabled right in your functions, because yes, adding that SHOULD work.

  5. jlewis004
    Member
    Posted 3 years ago #

    I used the PJW-MIME-Config plugin to enable a long list of MIME types in the SuperAdmin account (or the equivalent now that SuperAdmin is gone). This enabled the Admin to upload various media; however, individual users on the WP Multisite still can't upload media because of the "Sorry, this file type is not permitted for security reasons" message.

    So, in summa, because I am the network admin I can upload various file types that I've defined in the PJW plugin; however, individual users with unique sub-blogs can't upload anything. I have enabled various file types in the Network Admin --> Settings interface. Does anyone have any advice on how to allow the folks who have sub-blogs on my blog network to upload media (documents)? BTW - picture uploads work fine.

    Thnx in advance for any help you can provide!

    Specs:
    Wordpress 3.1.2
    Hosting: Network install on subdomain (of justinlewis.me) on GoDaddy.com (closed to anyone not logged in.

  6. chattan
    Member
    Posted 3 years ago #

    I tried the PJW-MIME-Config plugin today on a multisite and got the same problem, but fixed it by adding some MIME types in the Settings menu of the sub-site I was working with. Looks like there is no network-wide settings file which kicks in after network activation of the plugin. However, you can put all your common settings into a document and upload it to each multisite which needs it. Tedious, but a workround.

  7. duncanmoo
    Member
    Posted 2 years ago #

    If you are using a Multisite you need to add the file extension to the list at /wp-admin/network/settings.php

    Such a simple solution if you want to globally enable a file type on a multisite.

  8. mrg_edu
    Member
    Posted 2 years ago #

    True .. but not all mime types work if you add them there. 3gp does not, flp, flipchart, ..... all don't. PJW-Mime will allow them on a single site, but there is not a multi-site solution that I have found. So where is that simple solution if you want to globally enable a file type on a multisite if the mime is not built in? ...

  9. Josh Maxwell
    Member
    Posted 2 years ago #

    I've been having the same issue with WPMS.

    However, I've come up with a plugin to do the trick. You install it then activate it network wide. Then any mime type added to the associated txt file will be added as an allowed file type. The only problem is that I continue to receive errors.

    See this forum post for more info on the errors and this is the code.

    Any help would be appreciated!

  10. Josh Maxwell
    Member
    Posted 2 years ago #

    Figured it out! :D

    Here's the new code. Be sure to save code as extended-mime-types.php inside a folder called extended-mime-types. And create a text file called mime-types.txt.

    mime-types.txt must be formatted as follows:

    doc,doct application/msword
    pdf application/pdf

    Good luck!

  11. thenana
    Member
    Posted 2 years ago #

    Hi Josh!

    I have the same problem as you guys and I downloaded your code to fix the problem. I created a folder in the plugin folder as you mentioned and created your code file and the mime-types.txt. When I try to activate the Plugin I get the following Error:

    "Das Plugin hat unerwartet 1209 Zeichen während der Aktivierung erzeugt. Falls Sie Meldungen “headers already sent” sehen oder Ihr Feed nicht funktioniert, sollten Sie das Plugin deaktivieren oder löschen."

    Which means:

    "The Plugin has unexpectedly created 1209 characters while activating. If you can see the message "headers laready sent" or your ffed is not working, you should deactivate the plugin or delete it"

    Since then I see the source code on top of the admin page. I think it is not getting executed. Could you help me to get the plugin working? Thanks!

  12. Josh Maxwell
    Member
    Posted 2 years ago #

    thenana, I'm sorry, I must've forgotten to update this thread.

    I've added the plugin to the repository. Try uninstalling/deleting the old plugin from your site and install this one to see if that fixes your problem.

Topic Closed

This topic has been closed to new replies.

About this Topic