[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm

raeburn raeburn at source.lon-capa.org
Mon Aug 12 10:38:22 EDT 2019


raeburn		Mon Aug 12 14:38:22 2019 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Use same size limit (1 MB) for both client-side and server-side checking
    of message attachment size.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.188 loncom/interface/lonmsgdisplay.pm:1.189
--- loncom/interface/lonmsgdisplay.pm:1.188	Sun Aug 11 15:15:39 2019
+++ loncom/interface/lonmsgdisplay.pm	Mon Aug 12 14:38:21 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.188 2019/08/11 15:15:39 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.189 2019/08/12 14:38:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3009,7 +3009,7 @@
                 &Apache::lonnet::logthis('Failed to store To, Bcc and Cc recipients for '.$env{'user.name'}.':'.$env{'user.domain'});
             }
             if ($env{'form.attachment'}) {
-                if (length($env{'form.attachment'})<131072) {
+                if (length($env{'form.attachment'}) <= 1048576) {
                     $attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback/'.$now);
                 } else {
                     $r->print('<p><span class="LC_warning">'.&mt('Attachment not included - exceeded permitted length').'</span><br /></p>');




More information about the LON-CAPA-cvs mailing list