Currently the Writer only writes files that have a predefined URI into the FSKX archive. This is a contraint of the Combine Archive. The Reader also only loads files it knows (i.e. that are hardcoded) into the workspace. These URI's are predefined in the package FSKML, which is cumbersome to handle and update.
Here is an excerpt from the WriterNodeModel.java:
However there are more and more file types that start to appear which need to be also considered. Each time a model creator has a new file type, be it markdown,html, or now ONNX, we would need to go into the Writer/Reader code and add the URI for that.
I propose to have a function that generates and retrieves these URI's based on the file extension. Since the URI's don't need to actually resolve to anything, we can just make it up.
public static URI generateURI(String extension)
Both the Writer and Reader could use that for any file-type so we can be sure that at least most resource types are supported in the future.
We probably need to have some exceptions, like .exe or .dll or .sh. Anything that could be executed and potentially harm the system we should not allow.
Currently the Writer only writes files that have a predefined URI into the FSKX archive. This is a contraint of the Combine Archive. The Reader also only loads files it knows (i.e. that are hardcoded) into the workspace. These URI's are predefined in the package FSKML, which is cumbersome to handle and update. Here is an excerpt from the WriterNodeModel.java:![image.png](https://images.zenhubusercontent.com/5e4ba30f8f780f7f48f8f306/613045b1-d7a9-4f5c-8b44-35c8850bb742)
However there are more and more file types that start to appear which need to be also considered. Each time a model creator has a new file type, be it markdown,html, or now ONNX, we would need to go into the Writer/Reader code and add the URI for that. I propose to have a function that generates and retrieves these URI's based on the file extension. Since the URI's don't need to actually resolve to anything, we can just make it up.
public static URI generateURI(String extension)
Both the Writer and Reader could use that for any file-type so we can be sure that at least most resource types are supported in the future.
We probably need to have some exceptions, like .exe or .dll or .sh. Anything that could be executed and potentially harm the system we should not allow.