--- upload.module~	Tue May 25 17:05:06 2004
+++ upload.module	Tue Jul  6 13:38:10 2004
@@ -111,7 +111,7 @@
     $html = "<img src=\"$url\" alt=\"$upload_file->name\" border=\"0\"";
     if ($size[0] && $size[1])
      $html .= " width=\"$size[0]\" height=\"$size[1]\"";
-    $html .= "/>";
+    $html .= " />";
   } else {
     $html = "<a href=\"$url\">Download file</a>";
   }
@@ -158,6 +158,23 @@
   );
 }
 
+function _upload_filerow2($dir,$file) {
+  $file_url = file_create_url(variable_get('upload_path', 'public').FILE_SEPARATOR.$file);
+  $ffile = $dir.FILE_SEPARATOR.$file;
+  $info = stat($ffile);
+  if ($info['size'] > 1024*1024) 
+    $size = (int) ($info['size']/(1024*1024))."Mb";
+  else if ($info['size'] > 1024)
+    $size = (int) ($info['size']/1024)."kb";
+  else
+    $size = $info['size']."b";
+  return array(
+    array("data" => l($file,$file_url) ),
+    array("data" => $size ),
+    array("data" => format_date($info['mtime']) ),
+  );
+}
+
 function _upload_admin_overview() {
   $dir = file_create_path(variable_get('upload_path', 'public'));
   if (!file_check_directory($dir)) {
@@ -237,7 +254,7 @@
         array("data" => t("date") ),
       );
     
-      $rows[] = _upload_filerow($dir,$file);
+      $rows[] = _upload_filerow2($dir,$file);
       $output = theme("table", $headers, $rows);
     
       $form .= form_textfield(t("Rename"), "rename", $file, 30, 128);
