Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12975

KCFinder cannot upload an image, displays "Unknown Error"

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.2.7
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When using the KCFinder button to upload an image from my laptop, I get an "Unknown Error" messsage and the image fails to upload. ( I can use images that have been uploaded from another method, such as FTP.) This issue occurs in both CKFinder and TinyMCE that both ship with CiviCRM.

      The solution is to change code in the file "packages/kcfinder/core/uploader.php"

      Around line 125, remove the following section of code:
      // LINKING UPLOADED FILE
      if (count($_FILES))
      $this->file = &$_FILES[key($_FILES)];

      Replace that code with the following new code:
      // LINKING UPLOADED FILE
      if (count($_FILES)) {
      foreach($_FILES as $key => $value)

      { if($key) $this->file = &$_FILES[key($_FILES)]; }

      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: