Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-18722

Site Info generates error when content.upload.max > 2G

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.6.3, 2.7.1, 2.8.0
    • Component/s: Site Info
    • Labels:
      None

      Description

      This code calculates max file size as an int but should be a long to support filesizes > 2G:

      String max_file_size_mb = ServerConfigurationService.getString(
      "content.upload.max", "1");
      int max_bytes = 1024 * 1024;
      try

      { max_bytes = Integer.parseInt(max_file_size_mb) * 1024 * 1024; }

      catch (Exception e)

      { // if unable to parse an integer from the value // in the properties file, use 1 MB as a default max_file_size_mb = "1"; max_bytes = 1024 * 1024; M_log.warn(this + ".doUpload_Mtrl_Frm_File: wrong setting of content.upload.max = " + max_file_size_mb, e); }

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                zqian Zhen Qian
                Reporter:
                smarquard Stephen Marquard
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration