Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-2365

Upload filesize hardcoded to MB

    XMLWordPrintable

    Details

      Description

      In php.ini, upload_max_filesize and post_max_size were set to 10G per http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes

      In practice only videos up to 10MB could be uploaded. This is due to code in islandora_video_upload_form() (and similar functions for file upload in other solution packs) that ignores the byte designator and assumes megabytes are specified (so 10G is stripped down to 10, then applied as a 10MB limit).

      See https://github.com/Islandora/islandora_solution_pack_video/blob/7.x/includes/video_upload.form.inc#L20

      and

      https://github.com/Islandora/islandora_solution_pack_video/blob/7.x/includes/video_upload.form.inc#L28

      and

      https://github.com/Islandora/islandora_solution_pack_video/blob/7.x/includes/video_upload.form.inc#L34

      Work around is to specify size as (say) 10000M in php.ini

      A better solution would be to honour the php.ini shorthand byte values.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jhunt Jonathan Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: