I found the solution , and for those hwo have the same issue , I post the code :
BOOL CMyDoc::UploadFile(CString sFileName)
{
CString sTemp;
BOOL bRet = FALSE;
CInternetSession session;
CFtpConnection* pConn = NULL;
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
sTemp = sFileName.Right(sFileName.GetLength() - sFileName.ReverseFind('\\') - 1);
try
{
pConn = session.GetFtpConnection(\_T("ftp.domain.com"),\_T("username"),\_T("password"),INTERNET\_INVALID\_PORT\_NUMBER,TRUE);
bRet = pConn->PutFile(sFileName,\_T("./httpdocs/temp/") + sTemp);
}
catch(CException\* pException)
{
pException->GetErrorMessage(sTemp.GetBuffer(255),255);
sTemp.ReleaseBuffer();
pException->Delete();
pFrame->SetMessageText(sTemp);
}
if(pConn)
{
pConn->Close();
delete pConn;
}
return bRet;
}