0
回答
ftp4j图片上传问题
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

it.sauronsoftware.ftp4j.FTPException [code=550, message= /d:/picture/XSGJ/75EE1E6337944764BF3DDC034CA7C603: failed to create.]

文件夹创建成功了,而且图片也传上去了。不晓得为啥报错。

 

ftp.connect("******");

Log.d("H3c", ftp.toString());

ftp.login("****", "*****");

ftp.changeDirectory(new String("XSGJ".getBytes("UTF-8"), "iso-8859-1"));

ftp.createDirectory(new String(mendianId.getBytes("UTF-8"),

"iso-8859-1"));

ftp.changeDirectory(new String(mendianId.getBytes("UTF-8"),

"iso-8859-1"));

ftp.setCharset("utf8");

FTPFile[] list = ftp.list();

for (FTPFile file : list) {

Log.d("H3c", file.getName());

}

File fileDir = Environment.getExternalStorageDirectory();

File uploadFile = new File(fileName);

ftp.upload(uploadFile);

 

ftp.disconnect(true);

举报
zcphoenix
发帖于6年前 0回/730阅
顶部