I needed to know in which file specificaly. The problem I'm having is the options under Site Admin aren't saving.
I needed to know in which file specificaly. The problem I'm having is the options under Site Admin aren't saving.
They are kept in the DB - wp_sitemeta / upload_filetypes
Wow...well then in that case I now have no idea what's going on. In both my Site Admin Options page, and my wp_sitemeta / upload_filetypes table "flv" filetype is listed.
Yet despite every attempt to upload it I get the same error from wordpress telling me the file type is not allowed.
Anyone have any clue as to why this might be happening?
I've got max file size set to 30 megs and only trying to up a 5 meg file!
FYI the error I get is: "File type does not meet security guidelines. Try another."
edit blog.php and add this line udner the other allowed lines:
'fli' => 'video/fli'
I am sorry but I can't find the mime type for flv take this as an example.
the mime type for flv is as follows:
'flv' => 'video/x-flv',
unfortunately this produces no results either.
Okay, this is how I fixed my problem:
Went to http://blog.ftwr.co.uk/archives/2006/09/03/pjw-mime-config-v090-released/
And downloaded that man's plugin for adding more mime types to wordpress. It comes bundled with the the additional mime types needed to play flv files.
The plugin works in the mu-plugins folder, but I had to hack it a little bit to keep the Options page from displaying for non-site admins.
At line 50 change:
function admin_menu()
{
add_options_page('Mime types','Mime
To:
function admin_menu()
{
get_currentuserinfo();
if( is_site_admin() )
add_options_page('Mime types','Mime
If you don't want to bother with plugins, (which is the way to go), you can read my article about this fix. It's actually really easy to do and you don't need advanced php skills to do this. goto -> http://headfirstproductions.ca/wordpress-file-type-upload-error-security-fix/
*chuckle* the link 404s. I don't see it elsewhere on your home page so I can't fix the link.
Sorry I've updated some things last night. Here it is: http://headfirstproductions.ca/blog/wordpress-file-type-upload-error-security-fix/
That's for regular wordpress. May not work for WPMu.
I know that there's some code for this as well within (I'm doing this from memory) wp-content/blogs.php or index.php
I don't see anything within the index.php? I guess it's impossible for WPMu's to edit any of there pages? I've never used it before.
Actually it's in wp-content/blogs.php. I could do a search when I typed that.
Those filetypes are in there though so I guess it wouldn't be an issue.
i came to the above solution after having tried to edit both blogs.php and the options for uploadable file types. I'd strongly encourage using a plugin than hacking away at core files.
But we like hacking away at core files. :)
suleiman, your suggestion did not work for me. I see the options, and have added a file type, but I still cannot upload the additional file types.
I can't even upload zip files. I can however upload gif's and pdf's.
I think what everyone is asking is how can we set this up so that only the admin can control the types and so that the users cannot see them. I am having the problem in which the plugin works (pjw-mime-config-v090) but the users first have to enable it (or i can put it into the mu-plugins) and then have to add the file types before they can upload. It seems to be on a user by user basis and I want to make the changes global. Can anyone modify the code so that only the admin can make changes and globally effect everyone?
Anyone?
I'd just remove that portion of the code that gives them the option and hard code in the allowable file types.
suleiman, does your hack of the plugin solve the 'admin' versus 'user' view problem FifthE1ement mentions? Is it still per-user or is one set of allowed file-types universal? Anyone hacking something more WPMU specific?
Using 1.3.3 and in my wp-includes/functions.php is 'doc' => 'application/msword', but i still can not upload doc files. I have tried as a user and admin. Shouldn't i be able to upload the file types listed in functions.php?