FTP 上传文件是否有文件格式限制?解决思路

FTP 上传文件是否有文件格式限制?
本帖最后由 wb117908406 于 2014-04-16 11:05:38 编辑
CFileFind finder;
BOOL bWorking = finder.FindFile(m_strEditPath + "/*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
if (finder.IsDots() || finder.IsHidden() || finder.IsSystem())
continue;

CString strName = finder.GetFileName();
CString strPath = finder.GetFilePath();

if (!m_FtpConnect.m_pFtpConnection->PutFile(strPath, "PackUpdate/"+strName))
{
MessageBox("发布更新包失败!");
Log("发布更新包失败");
                        m_FtpConnect.Close();
return;
}
}

前提:
1.FTP连接成功  vs2008
2.我是在做目录下所有文件更新到FTP服务器上
3.本地目录下有*.jpg  *.tar  *.doc  *.xls  *.ini   *.txt

现象:
1.*.jpg  *.tar  *.xls 上传返回值成功,且文件已经更新到FTP服务器端
2.*.doc   *.ini   *.txt上传返回值成功,但文件并未更新到FTP服务器端

请教一下,初次接触FTP,好多地方不太懂,小弟先谢过了各位!
------解决方案--------------------
修改FTP服务器端相关设置
------解决方案--------------------
使用FTP binary mode试试
------解决方案--------------------
引用:
Quote: 引用:

Quote: 引用:

先试试用比如FlashFXP软件上传能否成功。


doc和txt上传失败

这是FlashFxp上传提示
[右] STOR test.txt
[右] 150 Opening data connection for test.txt.
[右] 226 File received ok
已传送: test.txt 0 字节 于 0.02 秒 (0.1 KB/秒)
[右] TYPE I

发现test.txt传输文件 0字节

最后给所有为空的文件添加内容,即所有文件内容不为空,上传成功。
不知道会不会跟CFtpConnection PutFile参数设置有关。前两个参数设置本地和FTP文件全路径,第3个参数设置传输方式ASCII或者BINARY,

GetLastError看看是什么原因。 
------解决方案--------------------
试试,openfile+ write自己上传呢?