Index: sandbox/filemanager/inc/class.vfs_functions.inc.php
===================================================================
--- sandbox/filemanager/inc/class.vfs_functions.inc.php	(revision 1704)
+++ sandbox/filemanager/inc/class.vfs_functions.inc.php	(revision 1829)
@@ -25,5 +25,6 @@
 			'editComment'=> True,
 			'rename'=>True,
-			'delete'=>True
+			'delete'=>True,
+			'summary' => True
 		);
 
@@ -214,18 +215,20 @@
 
 		}
-		function download()
+		function summary()
 		{
 			if($this->file)
-			{
-				//$GLOBALS['phpgw']->browser->content_header($this->file);
-				header ("Content-Type: application/octet-stream");
-				header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
+			{	
+				header('Content-Type: image/gif');
+				$expires = 60*60*24*15; /* 15 days */
+				header("Cache-Control: maxage=".$expires);
 				header("Pragma: public");
-				header("Expires: 0");
-				header ("Content-Disposition: attachment; filename=\"". addslashes($this->file)."\"");
-				echo $this->bo->vfs->read(array('string' => $this->file));
+				header("Expires: ".gmdate('D, d M Y H:i:s', time()+$expires));
+				echo $this->bo->vfs->summary(array('path' => $this->path,
+					'string' => $this->file
+				));
 				$GLOBALS['phpgw']->common->phpgw_exit();
 			}
 		}
+	
 		function delete(){
 			foreach($this->fileman as $filename)
Index: sandbox/filemanager/inc/upload.php
===================================================================
--- sandbox/filemanager/inc/upload.php	(revision 1804)
+++ sandbox/filemanager/inc/upload.php	(revision 1829)
@@ -20,4 +20,38 @@
 $path = base64_decode($_POST['path']);
 $show_upload_boxes = count($_FILES['upload_file']['name'])-1;
+
+
+function create_summaryImage($file){
+	list($width, $height,$image_type) = getimagesize($file);
+	switch($image_type)
+	{
+	case 1:
+		$image_big = imagecreatefromgif($file);
+		break;
+	case 2:
+		$image_big = imagecreatefromjpeg($file);
+		break;
+	case 3:
+		$image_big = imagecreatefrompng($file);
+		break;
+	default:
+		return;
+	}
+	$max_resolution = 48;
+	if ($width > $height){
+		$new_width = $max_resolution;
+		$new_height = $height*($new_width/$width);
+	}
+	else {
+		$new_height = $max_resolution;
+		$new_width = $width*($new_height/$height);
+	}
+	$image_new = imagecreatetruecolor($new_width, $new_height);
+	imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
+	ob_start();
+	imagegif($image_new);
+	$content = ob_get_clean();
+	return $content;
+}
 
 /* Its much faster test all files only one time */
@@ -97,5 +131,5 @@
 			else
 			{
-
+		
 				if ($bo->vfs->cp(array(
 					'from'=> $_FILES['upload_file']['tmp_name'][$i],
@@ -103,4 +137,5 @@
 					'relatives'	=> array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
 				)))
+				{
 					$bo->vfs->set_attributes(array(
 						'string'=> $_FILES['upload_file']['name'][$i],
@@ -111,4 +146,14 @@
 					)
 				));
+					if (!(strpos(strtoupper($_FILES['upload_file']['type'][$i]),'IMAGE') === FALSE))
+					{
+						$content = create_summaryImage($_FILES['upload_file']['tmp_name'][$i]);
+						$bo->vfs->set_summary(array(
+						'string'=> $_FILES['upload_file']['name'][$i],
+						'relatives' => array(RELATIVE_ALL),
+						'summary'=> $content
+					));
+					}
+				}
 				else{
 					$return[] = lang('Error:').lang('Your quota has exceeded the limit');
@@ -129,6 +174,6 @@
 				'relatives'	=> array(RELATIVE_ALL),
 				'attributes'=> array(
-					'mime_type' => $_FILES['upload_file']['type'][$i],
-					'comment' => stripslashes($_POST['upload_comment'][$i])
+				'mime_type' => $_FILES['upload_file']['type'][$i],
+				'comment' => stripslashes($_POST['upload_comment'][$i])
 				)
 			));
Index: sandbox/filemanager/js/draw_api.js
===================================================================
--- sandbox/filemanager/js/draw_api.js	(revision 1815)
+++ sandbox/filemanager/js/draw_api.js	(revision 1829)
@@ -239,5 +239,9 @@
 			retBuff += '<td></td>';
 		retBuff += fl.td+'<img src="'+(file.icon)+'">';
-		retBuff += '<a id="name_'+file.name+'" href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+file.name+'</a>&nbsp;</td>';
+		if((file.mime).toUpperCase().indexOf('IMAGE') == 0)
+			var mousefunc = 'draw_card(\''+file.name+'\')'
+		else
+			var mousefunc = 'document.getElementById(\'menu_newFilepreview\').style.visibility = \'hidden\'';
+		retBuff += '<a onmouseover="'+mousefunc+'" id="name_'+file.name+'" href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+file.name+'</a>&nbsp;</td>';
 		if (preferences.mime_type =='1') retBuff += fl.td+file.mime+'</td>';
 		if (preferences.size =='1') retBuff += fl.td+borkb(file.size)+'</td>';
@@ -531,2 +535,33 @@
 var toolbar = new toolbar();
 
+
+function draw_card(filename){
+	draw_window_card('preview','./index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(filename)+"&path="+base64_encode(currentPath));
+}
+
+function draw_window_card(id,url){
+	var menu = document.getElementById('menu_newFile'+id);
+	if (menu == null){
+		menu = document.createElement('DIV');
+		menu.className = 'menubox';
+		menu.id = "menu_newFile"+id;
+		menu.style.left = DocX;
+		menu.style.top = (DocY+20)+"px";
+		menu.width = "100%";
+		menu.innerHTML = '<img src="'+url+'">';
+		menu.onmouseout = function () { menuTimeout = setTimeout("document.getElementById('menu_newFile"+id+"').style.visibility = 'hidden'",50);}
+		menu.onmouseover = function () { clearTimeout(menuTimeout); };
+		menu.style.zIndex='1';
+		document.getElementById('divAppboxHeader').appendChild(menu);
+	}
+	else
+	{
+		menu.style.left = DocX;
+		menu.style.top = (DocY+20)+"px";
+		menu.innerHTML = '<img src="'+url+'">';
+	}
+	menu.style.visibility = 'visible';
+	clearTimeout(menuTimeout);
+	menuTimeout = setTimeout("document.getElementById('menu_newFile"+id+"').style.visibility = 'hidden'",5000);
+}
+
Index: sandbox/filemanager/templates/default/main.css
===================================================================
--- sandbox/filemanager/templates/default/main.css	(revision 1804)
+++ sandbox/filemanager/templates/default/main.css	(revision 1829)
@@ -17,5 +17,5 @@
     cursor: pointer;
     position: absolute;
-    width: 160px;
+    /* width: 160px;*/
     text-align: left;
     line-height:150%;
