Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6390

allowedMimeTypePattern property doesn't work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.12
    • 6.2.5
    • 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:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD