Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49598

Switch to getimagesizefromstring in file_storage

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9
    • Component/s: Files API
    • Labels:

      Description

      MDL-32471 introduced a function to get a file preview. As part of that, it gets the image dimensions using getimagesize(). In order to do so, it writes the image data (a string) to a file, and then calls getimagesize() against the file.

      Since it was introduced, we have bumped the requirements for Moodle, and now require PHP 5.4 which introduced a getimagesizefromstring() function. This would negate the need to store the file on disk.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Lyons
              Reporter:
              dobedobedoh Andrew Lyons
              Peer reviewer:
              Zachary Durber Zachary Durber
              Integrator:
              Dan Poltawski Dan Poltawski
              Tester:
              Damyon Wiese Damyon Wiese
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/15