1

I have a chrome extension, so it's pure javascript + chrome api. I want to upload via FTP protocol a file.

I have understood that vanilla javascript can't do FTP request. But is there any other way ? I'm in a Chrome extension but I haven't find any ftp purpoes in the online API

And I have to clarify, I have to upload a file via FTP on black box. I don't have any control on it. And this black box is not accessible via Internet, only via local network.

Emrys Myrooin
  • 2,179
  • 14
  • 39

1 Answers1

3

It seems like you can use the chrome-app-ftp library

var ftpClient = new FtpClient(host, port, user, password);

ftpClient.connect().then(function () {
   ftpClient.upload("test.txt", buffer)
});

But the socket api doesn't available in extensions. here is more information about it

Alexey Sh.
  • 1,734
  • 2
  • 22
  • 34