Hi,

I'm looking for a way to allow PUT on
- file:/// URI's
- to resources that have no extension
- by pushing entities of type "application/octet-stream"
(or whatever would be the metadata-service's default-mime)

Currently the file-client-helper checks the metadata-consistency of the file being put.

This check *always* fails when the file doesn't have an extension at all.


To resolve, I see two possible paths:

[1] let consistency check pass when:
      extension doesn't yield a mapped type
      AND the type being put matches the default.

Looking at the MetadataService I see it holding a defaultMediaType, but that one isn't considered when doing the consistency check. (While the default-language is, so this would put both in sync more.)


[2] allow to assign metadata to the "" extension (empty string)

I'm not entirely sure how the meaning of 'default' relates to the meaning of 'no extension', if those have different meaning, then I think this would be the appropriate way out.


I'm tempted to go for [2], but wanted to check here if I'm not overlooking possible conflicts or yet more elegant solutions, so please comment.

As before, I'll be happy to provide the patch for this.

regards,
-marc=

Reply via email to