FTP 上传文件是否有文件格式限制?解决思路
FTP 上传文件是否有文件格式限制?
前提:
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试试
------解决方案--------------------
GetLastError看看是什么原因。
------解决方案--------------------
试试,openfile+ write自己上传呢?
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试试
------解决方案--------------------
GetLastError看看是什么原因。
------解决方案--------------------
试试,openfile+ write自己上传呢?