Ionic FTP插件-FTP插件上载到特定文件夹
我正在尝试使用ftp插件上传文件,上传到根目录(www.mydomain.com)是可以的 这很好用:Ionic FTP插件-FTP插件上载到特定文件夹,ftp,ionic2,Ftp,Ionic2,我正在尝试使用ftp插件上传文件,上传到根目录(www.mydomain.com)是可以的 这很好用: this.fTP.upload(imageURI,’myfile.jpg’ ) 但我需要上传到www.mydomain.com/www/somefolder 我正在努力: this.fTP.upload(imageURI,’/Web/somefolder/myfile.jpg’ ) 但Get找不到指定的路径错误 有什么帮助吗?解决方法: this.fTP.upload(imageURI,’
this.fTP.upload(imageURI,’myfile.jpg’ )
但我需要上传到www.mydomain.com/www/somefolder
我正在努力:
this.fTP.upload(imageURI,’/Web/somefolder/myfile.jpg’ )
但Get找不到指定的路径错误
有什么帮助吗?解决方法:
this.fTP.upload(imageURI,’Web/somefolder/myfile.jpg’ )
我有一个相同的问题:- 文件上载失败
it.sauronsoftware.ftp4j.FTPException [code=550, message= Can't change directory to /upload/images/: No such file or directory]
var dataimage = file:///storage/emulated/0/Android/data/io.ionic.hootel.booking/cache/httpsimg1cfcdnclubaea6aea9ebd927206461cdfb666bcd800da6.jpg
/upload/images/ :- is server path
我的代码是
this.fTP.upload(dataimage, '/upload/images/');
经过一些研究,我得到了解决方案 dataimage//它是您的完整文件路径。 第二个参数是ftp文件夹和文件名。文件路径中的文件名相同 this.fTP.upload(dataimage,'/upload/httpsimg1cfcdnclubaea6aa9ebd927206461cdfb666bcd800da6.jpg'))