0
uploadFile 메소드를 사용하여 zoho에 파일을 업로드하고 싶지만, 불행히도 다음과 같은 메시지가 나타납니다.Zoho API 파일 업로드 오류 "요청을 처리 할 수 없습니다. 올바른 파일을 제공했는지 확인하십시오."
"요청을 처리 할 수 없습니다. 올바른 메소드 이름, 매개 변수 및 매개 변수 값을 입력했는지 확인하십시오."
$fields = array();
$fields['authtoken'] = $this->authtoken;
$fields['scope'] = "crmapi";
$fields['id'] = $id;
$fields['content'] = '@' . $content;
$ffilesize = filesize($content);
if ($ffilesize > 20000000)
{
die("File size must be less than 20MB");
}
$zoho_url = "https://crm.zoho.com/crm/private/xml/$module/uploadFile";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POST, count($fields));
@curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
$output = curl_exec($ch);
if ($err = curl_error($ch)) return $err;
curl_close($ch);
if($this->isError($output)){
echo $this->error;
}
return $output;
그것은 나를 위해 일입니다 전에. 하지만 현재는 그렇지 않습니다. –
누구나 다른 해결책을 가지고 있습니다 ... –
그것이 작동하지 않는다면, 왜 당신은 자신의 질문에 오답으로 대답 했습니까? – user10089632