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

    Details

    • Type: Bug Bug
    • Status: Confirmed
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 5.1, 5.2-dev
    • Fix Version/s: QA tracked issues
    • Labels:
    • Environment:

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Marcos Loureiro (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: