Index: extensions/File_Uploader/admin/admin_upload.php
===================================================================
--- extensions/File_Uploader/admin/admin_upload.php	(revision 19680)
+++ extensions/File_Uploader/admin/admin_upload.php	(revision 19681)
@@ -19,5 +19,5 @@
 	
 	if($_FILES['file_uploader_thumbnail']['size'] != 0 && $_FILES['file_uploader_file']['size'] != 0) {
-		$file_uploader_upload_thumbnail = file_uploader_upload_thumbnail($_FILES['file_uploader_thumbnail'], $file_uploader_upload_file['name_wo_extension'], $file_uploader_upload_file['extension']);
+		$file_uploader_upload_thumbnail = file_uploader_upload_thumbnail($_FILES['file_uploader_thumbnail'], $file_uploader_upload_file['name_wo_extension'], $file_uploader_upload_file['extension'], $file_uploader_upload_file['folder']);
 		if(count($file_uploader_upload_thumbnail['errors']) != 0)
 			$file_uploader_errors['thumbnail'] = $file_uploader_upload_thumbnail['errors'];
@@ -47,6 +47,12 @@
 	$file_uploader_file_extension = strtolower(substr(strrchr($file_uploader_file['name'], '.'),1));
 	$file_uploader_file_size = filesize($file_uploader_file['tmp_name']);
-	$file_uploader_file_directory = $file_uploader_galleries_dir.$file_uploader_destination_folder[$file_uploader_file_extension];
-	$file_uploader_file_destination = $file_uploader_file_directory.'/'.$file_uploader_file_name;
+	if (isset($file_uploader_destination_folder[$file_uploader_file_extension])) {
+		$file_uploader_file_category = $file_uploader_destination_folder[$file_uploader_file_extension];
+		$file_uploader_file_directory_full = $file_uploader_galleries_dir.$file_uploader_file_category;
+	} else {
+		$file_uploader_file_category = $file_uploader_destination_folder['others'];
+		$file_uploader_file_directory_full = $file_uploader_galleries_dir.$file_uploader_file_category;
+	}
+	$file_uploader_file_destination = $file_uploader_file_directory_full.'/'.$file_uploader_file_name;
 	$file_uploader_errors = array();
 	$return = array();
@@ -54,5 +60,5 @@
 	$return['name_wo_extension'] = $file_uploader_file_name_wo_extension;
 	$return['extension'] = $file_uploader_file_extension;
-	$return['folder'] = $file_uploader_destination_folder[$file_uploader_file_extension];
+	$return['folder'] = $file_uploader_file_category;
 	$return['destination'] = $file_uploader_file_destination;
 	$return['size'] = $file_uploader_file_size;
@@ -60,13 +66,13 @@
 	
 	//If the directory does not exist, we create it
-	if (!file_exists($file_uploader_file_directory))
-		if(!mkdir($file_uploader_file_directory))
-			$file_uploader_errors['upload_error'] = l10n('Unable to create folder ').$file_uploader_file_directory;
+	if (!file_exists($file_uploader_file_directory_full))
+		if(!mkdir($file_uploader_file_directory_full))
+			$file_uploader_errors['upload_error'] = l10n('Unable to create folder ').$file_uploader_file_directory_full;
 	//If the physical category si not in database, we add it
-	if (pwg_db_num_rows(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = "'.$file_uploader_destination_folder[$file_uploader_file_extension].'";')) == 0){
+	if (pwg_db_num_rows(pwg_query('SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = "'.$file_uploader_file_category.'";')) == 0){
 		$next_id = pwg_db_nextval('id', CATEGORIES_TABLE);
 		$category_rank = pwg_db_fetch_assoc(pwg_query('SELECT MAX(rank) FROM '.CATEGORIES_TABLE.';'));
 		$category_rank = $category_rank['MAX(rank)'] + 1;
-		pwg_query('INSERT INTO '.CATEGORIES_TABLE.' (id, name, dir, rank, status, visible, uppercats, global_rank) VALUES ('.$next_id.', "'.$file_uploader_destination_folder[$file_uploader_file_extension].'", "'.$file_uploader_destination_folder[$file_uploader_file_extension].'", '.$category_rank.', "'.$conf['newcat_default_status'].'", "'.boolean_to_string($conf['newcat_default_visible']).'", "'.$next_id.'", '.$category_rank.');');
+		pwg_query('INSERT INTO '.CATEGORIES_TABLE.' (id, name, dir, rank, status, visible, uppercats, global_rank) VALUES ('.$next_id.', "'.$file_uploader_file_category.'", "'.$file_uploader_file_category.'", '.$category_rank.', "'.$conf['newcat_default_status'].'", "'.boolean_to_string($conf['newcat_default_visible']).'", "'.$next_id.'", '.$category_rank.');');
 	}
 	
@@ -93,7 +99,5 @@
 			default:
 				$file_uploader_errors['upload_error'] = l10n('Upload error');
-		} 
-	} else if(!in_array($file_uploader_file_extension, $file_uploader_allowed_file_extension)) {
-		$file_uploader_errors['filetype'] = l10n('Type of file not supported');
+		}
 	} else if (file_exists($file_uploader_file_destination)) {
 		if ($conf_file_uploader['overwrite'] == 1)
@@ -111,5 +115,5 @@
 
 
-function file_uploader_upload_thumbnail($file_uploader_thumbnail, $file_uploader_file_name_wo_extension, $file_uploader_file_extension) {
+function file_uploader_upload_thumbnail($file_uploader_thumbnail, $file_uploader_file_name_wo_extension, $file_uploader_file_extension, $file_uploader_file_folder) {
 	include('static.inc.php');
 	
@@ -117,5 +121,5 @@
 	$file_uploader_thumbnail_extension = strtolower(substr(strrchr($file_uploader_thumbnail['name'], '.'),1));
 	$file_uploader_thumbnail_size = filesize($file_uploader_thumbnail['tmp_name']);
-	$file_uploader_thumbnail_directory = $file_uploader_galleries_dir.$file_uploader_destination_folder[$file_uploader_file_extension].'/pwg_representative';
+	$file_uploader_thumbnail_directory = $file_uploader_galleries_dir.$file_uploader_file_folder.'/pwg_representative';
 	$file_uploader_thumbnail_destination = $file_uploader_thumbnail_directory.'/'.$file_uploader_file_name_wo_extension.'.'.$file_uploader_thumbnail_extension;
 	$file_uploader_errors = array();
Index: extensions/File_Uploader/admin/static.inc.php
===================================================================
--- extensions/File_Uploader/admin/static.inc.php	(revision 19680)
+++ extensions/File_Uploader/admin/static.inc.php	(revision 19681)
@@ -2,5 +2,4 @@
 	$file_uploader_galleries_dir = PHPWG_ROOT_PATH.'galleries/';
 	
-	$file_uploader_allowed_file_extension = array('pdf', 'doc', 'docx', 'odt', 'xls', 'xlsx', 'ods', 'ppt', 'pptx', 'odp');
 	$file_uploader_allowed_thumbnail_extension = array('jpg', 'jpeg', 'gif', 'png');
 	
@@ -16,4 +15,18 @@
 		'pptx' => 'presentations',
 		'odp' => 'presentations',
+		'webm' => 'videos',
+		'webmv' => 'videos',
+		'ogv' => 'videos',
+		'm4v' => 'videos',
+		'mp4' => 'videos',
+		'flv' => 'videos',
+		'mp3' => 'musics',
+		'ogg' => 'musics',
+		'oga' => 'musics',
+		'm4a' => 'musics',
+		'webma' => 'musics',
+		'fla' => 'musics',
+		'wav' => 'musics',
+		'others' => 'others',
 	);
 ?>
