atinux / node-ftps

FTP, FTPS and SFTP client for node.js, mainly a lftp wrapper.
MIT License
202 stars 57 forks source link

How to create a new file on remote server? #45

Closed robin-chilliapple closed 7 years ago

stevenkissack commented 7 years ago

FTP is more about sending and receiving files to a remote server, not creating them. One quick way to solve this is to create a local file and use ftp.put() to push that to the remote server.

robin-chilliapple commented 7 years ago

Thanks for replying me, Just i am using same approach, create a local file and use ftp.put() to push that to the remote server, but a problem with that, when i create a local file which name have already in remote server file name , then ftp.put() method override it.how can i resolve it. Thanks in advance.

stevenkissack commented 7 years ago

I am not sure on what type of resolution you would want? If you still want to push a new file and know there will not be a clash with names, why not append on the timestamp to the filename.

This doesn't seem like a node-ftps issue anymore.

robin-chilliapple commented 7 years ago

OK, Thanks I have already done .