Theia: [Question] How to download files from develop workspace?

Created on 9 May 2018  路  5Comments  路  Source: eclipse-theia/theia

Drag & Drop has been supported to upload files and folders from local filesystem to remote workspace.
But it seems user can't download or save some files or folders from remote workspace to local filesystem.

Or did I miss some feature in theia?

question

Most helpful comment

This would be a nice feature, we would need to discuss what's the best way to implement it beforehand however. I.e would right-click -> Download be good enough? Supporting drag and drop from theia to outside OS might be too complicated for now, so that's what I would suggest. Kinda like how Google Drive does it (If you multi select stuff you would get a zip file containing the files). WDYT? Also maybe this should be discussed in another issue altogether (if one isn't already opened).

All 5 comments

@huyuwen, as far as I know, we do not yet have such a feature in Theia.

CC: @lmcbout

Right now, Drag & Drop use local filesystem to workspace only

Well then, do you have any recommend approaches to fetch file from remote workspace to local filesystem (where we launch web browser)?

This would be a nice feature, we would need to discuss what's the best way to implement it beforehand however. I.e would right-click -> Download be good enough? Supporting drag and drop from theia to outside OS might be too complicated for now, so that's what I would suggest. Kinda like how Google Drive does it (If you multi select stuff you would get a zip file containing the files). WDYT? Also maybe this should be discussed in another issue altogether (if one isn't already opened).

Alternatively, you could implement your custom backend contribution, and create a REST endpoint, that you can you to download the resources. Something similar we did for the HTML/SVG previewer. But instead of sending back the text or binary content to the frontend, you would need to download your files. Keep in mind; you'll have to map the file URIs to the appropriate endpoint URLs. I hope this helps.

Feel free creating a follow-up task for the corresponding feature request. Also, we accept PRs :)

Was this page helpful?
0 / 5 - 0 ratings