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 6 years ago

jpfeuffer commented 6 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 6 years ago

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

jpfeuffer commented 6 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 6 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.

jpfeuffer commented 3 months ago

Also, the CTDParser should be updated to read the "is_executable" tag for input files. Could help in putting some restrictions on the mine types even if no extension in the CTD is specified