次のカールコマンドをJitterbit操作に変換するにはどうすればよいですか?Jitterbit HTTP POST操作にcurl -F [email protected]{path/to/file.csvのようなファイルを添付するにはどうすればいいですか?
現在、私は私の運転のように構成されているcurl -i -u username:password -X POST -F [email protected]/path/to/file.csv
https://website.com/api/filepost
は次のとおりです。
スクリプト:
$ jitterbit.target.http.form_data = true; $ jitterbit.target.http.form_data.filename = "file.csv"; $ jitterbit.target.http.form_data.name = "file"; (カールを経由して成功した同じファイルを送っ)APIの仕様に合致する
ソース ヘッダなしのCSVファイル、
変容:テキストへ テキスト - ソースとターゲットの両方が同じファイル形式を使用します現在のソースファイル
I正常に認証されましたが、「No file attached」という400/Bad Requestのエラーメッセージが表示されます。
フルエラーメッセージ:
The operation "2. POST Preapplicants - CSV to API" failed.
Fatal Error
Failed to post to the url 'https://website.com/api/filepost’.
The last (and probably most relevant) error was: The server
returned HTTP Status Code : 400 Bad Request Error is: The
request could not be processed by the server due to invalid
syntax. Headers sent by the server: HTTP/1.1 400 Bad Request
Server: nginx/1.10.3 (Ubuntu) Content-Type: application/json
Transfer-Encoding: chunked Connection: keep-alive Cache-Control:
no-cache Date: Tue, 12 Sep 2017 18:55:38 GMT The response was:
{"message":"No file attached."}