Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20942

[Public API] Different behavior in setting max file size between field types Binary File and Image

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • QA tracked issues
    • 5.1, 5.2-dev
    • Server OS: Red Hat 6.4
      PHP: 5.3.3
      Database: MySQL 5.1.61
      Browser: Firefox 20

    Description

      The following code will behave differently on binary file field type and image field type.

      $newField->validatorConfiguration = array(
          'FileSizeValidator' => array(
             'maxFileSize' => 2 * 1024 * 1024
          )
      );
      

      on image = 2 MB = 2097152 B
      on binary file = 2097152 MB

      And on image if we set a value less than 1MB (1024 * 1024) the value set will be 0.

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcos.loureiro-obsolete@ez.no Marcos Loureiro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: