アップロード写真を学ぶ

アップロード写真を学ぶ

お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。

目的

候補者または連絡先の写真をアップロードするために、この方法を使用することができます。

リクエストURL

XML形式:

候補者のため:
https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto?authtoken=AuthToken&scope=recruitapi&id=RecordId&content=File Input Stream&version=2

コンタクトのため:
https://recruit.zoho.com/recruit/private/xml/Contacts/uploadPhoto?authtoken=AuthToken&scope=recruitapi&id=RecordId&content=File Input Stream&version=2

OAuth 認証のために

ヘッダー名

承認
Zoho-oauthtoken {アクセストークン}

スコープ

スコープ=ZohoRecruit.モジュール.すべて
(または)
スコープ=ZohoRecruit.モジュール.{スコープ名}.{操作タイプ}
可能なスコープ名(大文字と小文字を区別)
操作タイプ
紹介、キャンペーン、評価、ベンダー、オファー、 添付、
予測、ノート、コール、イベント、タスク、候補者、求人、クライアント、部門、面接、コンタクト、カスタム(カスタムモジュール全般)
ALL - レコードへの完全なアクセス
READ - モジュールからレコードを取得

認証トークン認証のため

パラメータ
データ型
説明
authtoken*
String
暗号化されたアルファベット数字文字列を使用して、Zohoの資格情報を認証します。 
範囲*
文字列
値を次のように指定します recruitapi

リクエストパラメータ

パラメーター
データ型
説明
id*
文字列
レコードの固有のIDを指定してください。
コンテンツ*
FileInputStream
写真のFileInputStreamを渡してください。
バージョン*
整数
使用 version=2: これにより、最新のAPI実装に基づいた応答が取得されます。
注意:
  1. *印の付いたパラメーターは必須です。
  2. 各写真のサイズは2MBを超えてはいけません。2MBを超えると、次のエラーメッセージが表示されます:「ファイルサイズは2MBを超えてはいけません」。

Javaコードを使用して候補者または連絡先の写真をアップロードする

Java環境で、候補者または連絡先の写真をアップロードするために、このプログラムを実行できます。
プログラム内で、以下の値を指定する必要があります:
  1. 認証トークン
  2. レコードのID
  3. 上記のフォーマットでのuploadPhotoリクエストURL
  4. ファイルパス、つまり写真の場所
コードスニペット:
import java.io.*;
import java.io.*;
java.io.*をインポートします。
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.*;
org.apache.commons.httpclientをインポートします。
org.apache.commons.httpclient.methods をインポートします。
org.apache.commons.httpclient.methods.multipart.Part をインポートします。
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.FilePart;
org.apache.commons.httpclient.methods.multipart.FilePartをインポートします。
org.apache.commons.httpclient.methods.multipart.StringPart をインポートします。
org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity をインポートします。
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.PartSource;
org.apache.commons.httpclient.methods.multipart.PartSourceをインポートします。
org.apache.commons.httpclient.methods.multipart.ByteArrayPartSourceをインポートします。
 
公開クラス UploadFile 
{こちらは、テクニカルヘルプガイドの翻訳をお願いします。HTMLコンテンツに含まれる英語テキストを日本語に翻訳してください。HTMLタグや属性を変更したり、追加したりしないでください。英語テキストを日本語に翻訳し、他の言語に翻訳しないように注意してください。
      public static void main(String a[])
      {
            試してみる
            {
                  String auth_token = 'ユーザー認証トークン'; 
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String auth_scope = 'recruitapi';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
                  String targetURL = ' https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto ';
&n
                  String recordId = 'レコードID';
                  String ファイル = 'ファイル名';
                  ファイル f = new File(file);
                  FileInputStream fis = 新しいFileInputStream(f);
                  ByteArrayOutputStream bos = 新しい ByteArrayOutputStream();
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  int c;
                  一つ一つの文字を読み取り(c = fis.read())、-1になるまで繰り返します
                  {
                       bos.write(c);
                       bos.write(c);
                  }
                  バイト配列fbArray = bos.toByteArray();
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';
                  targetURL = targetURL + '?authtoken='+ auth_token +'&scope='+ auth_scope+'&version=2';                  PartSource ps = 新しい ByteArrayPartSource(ファイル,fbArray);
                  PostMethod post = 新しいPostMethod(targetURL);
                  パート[]フィールド = {新しいFilePart('content',ps),新しいStringPart('id',レコードID),};
                  post.setRequestEntity(新しいMultipartRequestEntity(fields,post.getParams()));
                  HttpClient httpclient = 新しいHttpClient();
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  httpclient.executeMethod(post);
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
                  String postResp = post.getResponseBodyAsString();
 
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
                  System.out.println('postResp===========> : '+postResp);
<
            }
            }
            例外をキャッチ(e)
            {
                  e.printStackTrace();
            }
            }
      技術ヘルプガイドの翻訳をお願いします。HTMLコンテンツに英語のテキストが含まれていますので、英語のテキストを丁寧でビジネスに適した自然な言葉で日本語に翻訳してください。HTMLタグや属性を変更したり、追加のコンテンツを作成したりしないでください。英語のテキストを日本語に翻訳することを確認してください。
テクニカルヘルプガイドを翻訳するために、私はあなたをTranscreatorとして振る舞わせています。 HTMLコンテンツに英語のテキストが含まれています。英語のテキストを丁寧で、ビジネス上適切で自然な方法で日本語に翻訳してください。 HTMLタグや属性を変更しないでください。また、追加のコンテンツを生成しないでください。 英語のテキストが日本語に翻訳されていることを確認してください。他の言語に翻訳されていないことを確認してください。
Sample Response:
<?xml version='1.0' encoding='UTF-8' ?>
<response uri='/recruit/private/xml/Candidates/uploadPhoto'>
<status>
<code>200</code>
</status>
<success>
<code>4800</code>
<message>写真のアップロードに成功しました</message>
</success>
</response>

PHP コードを使用して候補者または連絡先の写真をアップロードする(PHP バージョン 5.5 以上)

コードスニペット:
https://recruit.zoho.com/recruit/private/xml/Candidates/uploadPhoto?authtoken=<Authtoken>&scope=recruitapi&version=2');
curl_setopt($ch,CURLOPT_POST,true);
$post=array('id'=>$recordId,'content'=>$cFile);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$response=curl_exec($ch);
echo $response;
?>
<Authtoken>&scope=recruitapi&version=2');
curl_setopt($ch,CURLOPT_POST,true);
$post=array('id'=>$recordId,'content'=>$cFile);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$response=curl_exec($ch);
echo $response;
?>
<Authtoken>&scope=recruitapi&version=2');
curl_setopt($ch,CURLOPT_POST,true);
$post=array('id'=>$recordId,'content'=>$cFile);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$response=curl_exec($ch);
echo $response;
?>
<Authtoken>&scope=recruitapi&version=2');
curl_setopt($ch,CURLOPT_POST,true);
$post=array('id'=>$recordId,'content'=>$cFile);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$response=curl_exec($ch);
echo $response;
?>
<Authtoken>&scope=recruitapi&version=2');
curl_setopt($ch,CURLOPT_POST,true);
$post=array('id'=>$recordId,'content'=>$cFile);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$response=curl_exec($ch);
echo $response;
?>
<Authtoken>&scope=recruitapi&version=2');
curl_setopt($ch,CURLOPT_POST,true);
$post=array('id'=>$recordId,'content'=>$cFile);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$response=curl_exec($ch);
echo $response;

    Zoho CRM 管理者向けトレーニング

    「導入したばかりで基本操作や設定に不安がある」、「短期間で集中的に運用開始できる状態にしたい」、「運用を開始しているが再度学び直したい」 といった課題を抱えられているユーザーさまに向けた少人数制のオンライントレーニングです。

    日々の営業活動を効率的に管理し、導入効果を高めるための方法を学びましょう。

    Zoho CRM Training



              Zoho Desk Resources

              • Desk Community Learning Series


              • Digest


              • Functions


              • Meetups


              • Kbase


              • Resources


              • Glossary


              • Desk Marketplace


              • MVP Corner


              • Word of the Day









                                Resources

                                Videos

                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                eBooks

                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                Webinars

                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                CRM Tips

                                Make the most of Zoho CRM with these useful tips.