Code-server: Add file and directory upload feature

Created on 6 Mar 2019  Â·  9Comments  Â·  Source: cdr/code-server

enhancement needs-decision

Most helpful comment

We do support drag and drop for uploading both files and directories.

You can drag into the main area of the editor (which will upload to the workspace root) or into the file tree (which will upload into whatever directory you dropped it on).

I think adding a button (and command) for uploading would be a good move, especially to make it more accessible from the keyboard.

We don't support downloading directories and files through the UI yet, but we want to eventually.

All 9 comments

You can use scp to do this easily. We can definitely add a UI for scp though.

You can use scp to do this easily. We can definitely add a UI for scp though.

Well。 Use scp command is not a good way for windows. The UI scp is a good way. The other way is to use plugin solve this. Please think about this:

https://github.com/liximomo/vscode-sftp

https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs

https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-remote-workspace

Nextcloud has a nice way of handling this. You can just drag&drop the folder in place, and it uploads accordingly. A seperate "upload file here" button would also be nice.

Not sure if this is the right issue to address this, but i'd also like to see a download button for individual files, as well as folders/the project as zip.

I believe we have this 🤔

cc: @coderasher

We do support drag and drop for uploading both files and directories.

You can drag into the main area of the editor (which will upload to the workspace root) or into the file tree (which will upload into whatever directory you dropped it on).

I think adding a button (and command) for uploading would be a good move, especially to make it more accessible from the keyboard.

We don't support downloading directories and files through the UI yet, but we want to eventually.

The Theia project recently implemented this exact same issue in case you want to check out their implementation.

I am sorry to resurrect this discussion, but it looks like the upload feature is not cross-platform.
I am hosting code-server on linux;

  • Drag-n-drop on a linux machine works like a charm
  • On chrome OS it says "Cannot read property 'isFile' of null"
  • On windows it tries to copy a file into a path with backslashes instead of normal slashes. I get something like "Cannot copy '/\homeusername\bluh-bluh': access denied"

Please bring this up on #233. I'll be locking this thread.

Was this page helpful?
0 / 5 - 0 ratings