Andreas Hartmann schrieb:
Hi Lenya devs,

I'd like to introduce the method

  String[] ResourceType.getSupportedMimeTypes()

Purpose:

* Resource types can be restricted to particular mime types.

* When a document is created, the repository can throw an exception if the mime type is not supported by the resource type.

* Upload (and WebDAV access etc.) can be safely enabled for various resource types.

* The Firedocs editor (and maybe other editors?) requires a list of mime-types for asset upload. IMO configuring this at resource type level makes the most sense.


The configuration could look like this, e.g. for the "resource" resource type:

  <mime-types>
    image/jpg, image/gif, image/png,
    application/pdf
  </mime-types>


Better

<supports>
  <mime-type>image/jpg</mime-type>
  <mime-type>image/gif</mime-type>
  <mime-type>image/png</mime-type>
  <mime-type>application/pdf</mime-type>
</supports>

and no wildcards.

- Felix

At a first glance it would be appealing to support wildcards (e.g., image/*), but AFAIK this wouldn't be compatible with Firedocs. (@Thomas: is this correct?)


WDYT?

-- Andreas




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to