How to Add an Attachment File Size Limit to Unicenter Service Desk 6.0

Document ID : KB000027859
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

Can a restriction be put on the size of a file attachment for Unicenter Service Desk 6.0?

Answer:  

By default Unicenter Service Desk 6.0 users can attach documents to tickets without a file size limit on the file attachment, this can be altered. Edit the file_upload.pl and web_upload.pl files to add the file size limitations. 

Open each file using notepad or "vi" and look for the variable: "$cgi_lib'maxdata" and remove the comments:


For example, you would need to change:

      # $cgi_lib'maxdata = 131072; # maximum bytes to accept via POST - 2^17

TO

      $cgi_lib'maxdata = 131072; # this is the size in byte

AND

# if ($len > $cgi_lib'maxdata) { #' 
      # read(STDIN, $in, $len);
      # &CgiDie("cgi-lib.pl: Request to receive too much data: $len bytes\n");
      # }

TO

if ($len > $cgi_lib'maxdata) { #'
      read(STDIN, $in, $len);
      &CgiDie("cgi-lib.pl: Request to receive too much data: $len bytes\n");
      }

Additional Information:

Please be aware that Unicenter Service Desk 6.0 is currently at the "End of Service", and the information in this document is provided for historic reference.
http://www.ca.com/us/support/ca-support-online/product-content/status/support-life-cycle/indexes/ca-service-desk-family-release-and-support-lifecycle-dates.aspx?intcmp=searchresultclick&resultnum=16