private static function checkFileMime($file, $validMime) {
		
		if (!function_exists('mime_content_type')) {
			$app = Application::getInstance();
			$app->enqueueError('The PHP extention mime_content_type is not installed');
			return NULL;
		}
		
		$pathParts = pathinfo($file);
		$extension = $pathParts['extension'];
		
		// force to array
		$validMime = (array)$validMime;

		foreach ($validMime as $item) {
		
			if ($item == mime_content_type($file)) {
				return TRUE;
			}
			
		}
		
		return FALSE;
		
	}