4
curl FTP를 사용하여 HU98373 + TRRepr # o4_201702061135_34 로컬 시스템에서 원격 대상으로 파일을 복사하려고했습니다. libcurl을 사용하여 파일 이름을 특수 문자로 업로드
는 원격 시스템에서 그것은 HU98373 + TRRepr으로 파일을 생성하지만 HU98373 + TRRepr # o4_201702061135_34있다. 왜 '#'문자를 고려하지 않는지 모르겠다.아래 코드를 확인하십시오.
remoteFileUrl = ftp://IPADRESS/HOME/HU98373+TRRepr#o4_201702061135_34.tmp/C20170206.1135-20170206.1140
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_URL, remoteFileUrl);
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_UPLOAD, ON);
// Set the input local file handle
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_READDATA, localFileHandle);
// Set on/off all wanted options
// Enable ftp data connection
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_NOBODY, OFF);
// Create missing directory into FTP path
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_FTP_CREATE_MISSING_DIRS , ON) ;
// Set the progress function, in oder to check the stop transfer request
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_NOPROGRESS, OFF);
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_PROGRESSFUNCTION, progressCb);
curl_easy_setopt(m_CurlSessionHandle, CURLOPT_PROGRESSDATA, this);
CURLcode curlOperationResult = curl_easy_perform(m_CurlSessionHandle);
어떤 사람은 다음과 같은 부분으로이
원격 파일 URL : .. ... 인코딩 된 URL : ... 오류 코드 : 6, 호스트 이름을 확인할 수 없습니다. libcurl 호출을 오류 코드와 함께 실패한 후 –
rohit
을 처리하는 방법을 가르쳐주세요. 6 호스트 이름을 확인할 수 없습니다. – rohit
# % 23 (으)로 인코딩되었고 파일 업로드 중 나머지 문자열을 건드리지 않았습니다. 오류 18, 부분 전송 됨 파일, 서버가 확인되지 않았습니다. 426 – rohit