diff --git a/core/trunk/core/class/docservers_controler.php b/core/trunk/core/class/docservers_controler.php
index dafe037fa8b4240875c16a0a9588ecd108ec8750..b10a16b2d8bbb496aa5f250edc13a837f48296b7 100644
--- a/core/trunk/core/class/docservers_controler.php
+++ b/core/trunk/core/class/docservers_controler.php
@@ -33,6 +33,7 @@
 
 //Loads the required class
 try {
+    require_once 'core/class/class_request.php';
     require_once 'core/class/docservers.php';
     require_once 'core/docservers_tools.php';
     require_once 'core/core_tables.php';
diff --git a/core/trunk/core/docservers_tools.php b/core/trunk/core/docservers_tools.php
index 0d5fc0d5f87147ea6e030e54fabf93d328566ad3..724e67f61c4bdc10ce987f5bbaab89e85ff5239a 100644
--- a/core/trunk/core/docservers_tools.php
+++ b/core/trunk/core/docservers_tools.php
@@ -531,3 +531,54 @@ function Ds_isCompleteFile($file, $delay=500, $pointer=0)
         return Ds_isCompleteFile($file, $delay, $currentPos);
     }
 }
+
+/**
+ * Check the mime type of a file with the extension config file
+* Return array with the status of the check and the mime type of the file
+* @param  string $filePath
+* @param  array
+*/
+function Ds_isFileTypeAllowed($filePath)
+{
+    $mimeType = Ds_getMimeType(
+        $filePath
+    );
+    if (file_exists($_SESSION['config']['corepath'] . 'custom' 
+        . DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'] 
+        . DIRECTORY_SEPARATOR 
+        . 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] 
+        . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR 
+        . 'extensions.xml')
+    ) {
+        $path = $_SESSION['config']['corepath'] . 'custom' 
+        . DIRECTORY_SEPARATOR . $_SESSION['custom_override_id'] 
+        . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR 
+        . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . 'xml' 
+        . DIRECTORY_SEPARATOR . 'extensions.xml';
+    } else {
+        $path = 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] 
+        . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'extensions.xml';
+    }
+    $xmlconfig = simplexml_load_file($path);
+    $ext_list = array();
+    $i = 0;
+    foreach($xmlconfig->FORMAT as $FORMAT) {
+        $ext_list[$i] = array(
+            'name' => (string) $FORMAT->name, 
+            'mime' => (string) $FORMAT->mime
+        );
+        $i++;
+    }
+    $type_state = false;
+    for($i=0;$i<count($ext_list);$i++) {
+        if($ext_list[$i]['mime'] == $mimeType) {
+            $type_state = true;
+            break;
+        }
+    }
+    $arrayReturn = array(
+        'status' => $type_state,
+        'mime_type' => $mimeType,
+    );
+    return $arrayReturn;
+}