--- loncom/interface/lonerrorhandler.pm	2008/11/21 20:17:11	1.20
+++ loncom/interface/lonerrorhandler.pm	2009/02/12 21:15:47	1.23
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Internal Server Error Handler
 #
-# $Id: lonerrorhandler.pm,v 1.20 2008/11/21 20:17:11 jms Exp $
+# $Id: lonerrorhandler.pm,v 1.23 2009/02/12 21:15:47 schafran Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -105,6 +105,18 @@ ENDMESSAGE
 	my $env='';
 	my $syllabus='';
 
+	foreach $envkey (keys(%env)) {
+            if ($envkey =~ /^form\.(.+)\.filename$/) {
+                my $item = $1;
+                if (exists($env{'form.'.$item.'.mimetype'})) {
+                    if (exists($env{'form.'.$item})) {
+                        my $size = (length($env{'form.'.$item}))/(1024.0 * 1024.0);
+                        $env{'form.'.$item} = &mt('File (contents not shown) - size was [_1] MB.',sprintf("%.4f",$size));
+                    }
+                }
+            }
+        }
+
 	foreach $envkey (sort(keys(%env))) {
 	    $env.="$envkey: $env{$envkey}\n";
 	}
@@ -126,7 +138,7 @@ ENDMESSAGE
 .'<p>'.&mt('Please help us to find out what.').'</p>'
 .'<p>'.&mt('Please take a moment to fill out the form below.').' '
 .&mt('Your information, together with internal debugging information, '
-    .'will be emailed to the system and server administrators.')
+    .'will be e-mailed to the system and server administrators.')
 .'</p>
 <form action="/adm/errorhandler" method="post">
 <h3>'.&mt('Please describe what you did just before this screen came up').'</h3>
@@ -144,7 +156,7 @@ ENDMESSAGE
 <input type="hidden" name="syllabus" value="'.$syllabus.'" />
 <input type="hidden" name="sendinfo" value="1" />
 <p>
-<input type="submit" title="Send Information" value="'.&mt('Send').'" />
+<input type="submit" title="'.&mt('Send Information').'" value="'.&mt('Send').'" />
 </p>
 </form>
 <h1>'.&mt('Thank you for your help!').'</h1>
@@ -184,4 +196,4 @@ described at http://www.lon-capa.org.
 
 None
 
-=cut
\ No newline at end of file
+=cut