【发布时间】:2011-10-12 13:28:09
【问题描述】:
我正在使用
FTPClient con = new FTPClient();
try
{
con.connect(HOST);
if (con.login (LOGIN, PASSWORD))
{
con.enterLocalPassiveMode();
InputStream instream = context.openFileInput(filename);
con.storeFile(filename, instream);
instream.close();
}
}
catch (Exception e)
{
e.printStackTrace();
}
try
{
con.logout();
con.disconnect();
}
使用文本文件即可。有了图片文件,图片就很诡异了:
如何纠正?
【问题讨论】:
-
您使用的是哪个 ftp 库?尝试以二进制模式传输图像。