Frage

I'm using this code here to transfer a file from my computer to a remote server, using the ssh2 module in node. It works perfectly when I use node directly for the job but I want to transfer the file from my browser using SSH.

I was thinking I could use browserify for the job. My idea was that a user presses a button in the browser and the bundle.js script tag activates the above linked module, allowing the user selected file to be transferred to the server.

Any ideas on how this can be done?

War es hilfreich?

Lösung

The main problem as far as I know with trying to use something like ssh2 with browserify is that the crypto in browserify is lacking still. Also the other big problem is that there is no shim/polyfill for plain TCP sockets in the browser (for now). I did see a project where someone had a client/server thing for browserify to emulate TCP sockets, but it doesn't look like it's maintained anymore.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top