[SOLVED] FTP connection and copying file using Javascript


This Content is from Stack Overflow. Question asked by Marileni

I want to upload a file to an FTP server.

I’m using Angular but after some research I realized that Angular has no way to upload files to FTP. So I tried to follow this code but I didn’t have any success because ‘new FtpConnection()’ is not recognized by javascript.

Is there any other valid code to upload a file to FTP via javascript or do I need to upload the file to FTP via the backend? (I use c# in backend)


Assuming you are already loading the Web Access library (webaccesslib) as stated in previous pages of your documentation, please ensure you’re respecting capitalization when calling class instances.

var file = new File("/d/project/test_file.psd");

Must have File with capital F. The error is saying there’s no implementation of class file.

This Question was asked in StackOverflow by zingy and Answered by Alfabravo It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?