Uploaded image for project: 'Magnolia DAM Module'
  1. Magnolia DAM Module
  2. MGNLDAM-981

AllowedMimeTypePattern property doesn't work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.0.10
    • None
    • None

      Edition   Magnolia DX Core
      Version (bundle)   6.2.4 (Snapshot: 2020.10.30 12:17:37)

      It should be possible to restrict the type of assets for upload.  When using the $type: uploadField with its allowedMimeTypePattern property:

        form:
          properties:
            upload:
              $type: uploadField
              allowedMimeTypePattern: image/jpeg
      

      A warning does pop up for the unsupported type, but if the user still hits Save changes in the dialog, even the unsupported type gets eventually uploaded:

      [^Kazam_screencast_00009.mp4]

      Dev note

      Quick check if Vaadin has API to check the mime type on client-side, but only worth a 1 SP.

       

        Acceptance criteria

              asiska Adam Siska
              mdrapela Martin Drápela
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD