This will need implementing and handling in coolwsd’s DocumentBroker to be able to fetch the file, insert it into the jail and hand a re-written UNO command to the Kit process. This shouldn’t be unfeasibly difficult - happy to provide some code-pointers if you like. I would imagine the command essentially passes a path through to the kit that is to a file that doesn’t exist in the jail - if it makes it through at all; we white-list supported UNO commands in the core in desktop/source/lib/ - and I suspect this is not one (yet). Hope that helps.
Yes I studied the code on GitHub and came to similar ('tho less in depth) conclusion myself.
My current (hacky) plan is to initiate another off screen instance of the editor and use the browser clipboard to amalgamate the docs. My preference would be using uno commands because I am not sure whether the clipboard api will be complaining about clipboard access at every request or not …
If you are able to provide any further hints that would be great, I would love to contribute to this project.
Hey - we’d love to have you contribute. So @ash would be the best person to help you here I think;
bool DocumentBroker::download(const std::shared_ptr& session, const std::string& jailId)
has the code for a synchronous download that would need re-factoring out I guess. I think we’d need to catch the UNO command passing by in bool ClientSession::filterMessage(const std::string& message) const and re-write it to handle the newly downloaded file. Hopefully that helps a bit ?
Then again @ash is doing some even-more-async work around this code AFAIR that will need merging soon.