0
回答
ftp4j图片上传问题
终于搞明白,存储TCO原来是这样算的>>>   

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
发帖于5年前 0回/728阅
顶部