Felix Röthenbacher schrieb:
Andreas Hartmann schrieb:

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>

Is the intention of the generic <supports> element to allow for later additions, like e.g. a maximum content-length value? Otherwise I find it a bit unusual to use a generic element as the parent of specific elements. Most schemas would probably use

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

But I'm +0 to use <supports> as the parent.

WDOT?

-- 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