Use JSROOT FileProxy to access files from WebView#20
Use JSROOT FileProxy to access files from WebView#20linev wants to merge 9 commits intoAlbertoPdRF:masterfrom
Conversation
JSROOT used just from file system
Skip atob and btoa modules
|
Now it is working, using JSROOT from master branch. I found a way to correctly use |
|
Hey @linev! All your work here is incredible!! Thank you so much! I don't have much time now to go through everything, but I'll try to get to it as soon as possible. Would you mind if I split all the different changes in different PRs when I have the time? |
This is extracted from #20 Co-authored-by: Sergey Linev <S.Linev@gsi.de>
|
I've finally been able to take a look at the PR! For these changes to also work when the extension runs in remote environments, Meanwhile, I've extracted the part that allows the PNG screenshots to be saved in 48e321b. Thanks for all your help @linev! |
What kind of remote environments? Reading of local files works ok.
As I understand, it is limitation of |
When VS Code runs on the browser, through SSH, or things like that.
Yes, exactly! And it seems like the right functionality is already implemented, it's just that it's not exposed yet for extensions to use. |
|
Probably, one can detect such remote environment? |
|
Yes, I believe one should be able to detect the remote environment. However, I don't think one could use http requests like you can do when JSROOT runs in the browser standalone, as VS Code mounts a virtual file system and everything runs in more or less the same way (WebView restrictions, etc.) |
|
Then one have to use |
|
Yep! Let's see if the people from VS Code reply, and then we can see how to move forward 🙂 |
I introduce
FileProxyclass in JSROOT and will try to use it here.Idea that binary data from the file can be read though such proxy.
That I am missing - how node modules can be used on
Codeside?You see commented lines:
I need standard "fs" module and "btoa" module from node.
Also would be nice if you could help to produce filename which can be used to read file content.