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>

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


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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

Reply via email to