I have an ItemType "COCO_STUDY" with a relation "COCO_STUDY_FILE" pointing to a "File".
The selection of the file is done with <input type="file">.
I would like to implement an option (here: "Add imported file in documents"), to copy the selected and imported document into ARAS (as a File) and pointed by the current "COCO_STUDY" through a "COCO_STUDY_FILE".
I understood that I need to use attachPhysicalFile but how ?
If I well understood, for security reason, the browser doesn't fullpath of the selected file.
So, I don't know how to pass it to attachPhysicalFile.
I tried to hardcode the filename for a test but it doesn't work.
// Add imported file in ARAS
let inn = top.aras.newIOMInnovator();
let link_study_file = inn.newItem("COCO_STUDY_FILE", "add");
let fileAras = inn.newItem("File", "add");