]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Modify configuration to have an option to allow uploads regardless of mime type
authorCraig Andrews <candrews@integralblue.com>
Tue, 2 Mar 2010 00:56:16 +0000 (19:56 -0500)
committerCraig Andrews <candrews@integralblue.com>
Tue, 2 Mar 2010 02:44:41 +0000 (21:44 -0500)
config.php.sample
lib/mediafile.php

index b8852dc672f3b755b3e715b2df1969e825e85168..5c5fb5b539341e2aa7e108feb81ddfdde1883ac1 100644 (file)
@@ -275,6 +275,8 @@ $config['sphinx']['port'] = 3312;
 // Support for file uploads (attachments),
 // select supported mimetypes and quotas (in bytes)
 // $config['attachments']['supported'] = array('image/png', 'application/ogg');
+// $config['attachments']['supported'] = true; //allow all file types to be uploaded
+
 // $config['attachments']['file_quota'] = 5000000;
 // $config['attachments']['user_quota'] = 50000000;
 // $config['attachments']['monthly_quota'] = 15000000;
index e3d5b1dbcc40a1a7cbf58af5d4c316ff221f5af9..10d90d0081e877f5742194387a7019b5cad5f084 100644 (file)
@@ -262,7 +262,7 @@ class MediaFile
             $filetype = MIME_Type::autoDetect($stream['uri']);
         }
 
-        if (in_array($filetype, common_config('attachments', 'supported'))) {
+        if (common_config('attachments', 'supported') === true || in_array($filetype, common_config('attachments', 'supported'))) {
             return $filetype;
         }
         $media = MIME_Type::getMedia($filetype);