On Sat, 29 Aug 2015 10:24:45 GMT, Louie Bacani Foronda wrote:
How do I upload a file to ftp server?
I checked the API but there is no upload on vibe.inet.urltransfer only download... is there a way that we could add this?
for now I will try to use the std.net.curl...
Hello, here is how i put it,
add libs: ["curl"], to dub.json
import std.net.curl;
auto file = normalize("your/filename.ext");
auto ftp = FTP();
ftp.setAuthentication("username","password"); // for those who have userpwd
upload(file,'ftp://ftpsite/folder/filename.ext', ftp);
take note you must specify the whole filename.ext on the second param or you will get bad illegal url on handle error...