genericworkflownodes / GenericKnimeNodes

Base package for GenericKnimeNodes
https://github.com/genericworkflownodes/GenericKnimeNodes
Other
15 stars 16 forks source link

Rework MIME Type handling #227

Open jpfeuffer opened 5 years ago

jpfeuffer commented 5 years ago

There are some points to consider: 1) Add an "any" or "*" MIME type, so some nodes can accept any type 2) Maybe add missing mime types on the fly. (With a single extension of the newly found one, and a name like "unknown-$extension"

jpfeuffer commented 5 years ago

Also 3) FileListPorts should probably have a MIMETypeSet to allow mixed lists.

jpfeuffer commented 5 years ago

And what if mimetypes overlap, e.g. when multiple plugins include an extension in one of their mime types. Probably also not handled here.

jpfeuffer commented 5 years ago

So I found the best possibility is just to use the extension as is, if no mimetype is found. Makes more sense than failing IMHO. A perfect match should always be allowed, only a fallback should be to compare possible Mimetype agreement.