0
"file"という名前のフォームデータパラメータ内に複数の画像をアップロードできるpost API呼び出しがあります 郵便受けでは、キー "ファイル"を持つフォームデータで複数のファイルを送信できます。複数のファイルとしての値安心して複数のファイルをアップロード
安心のJavaクライアントで同じ呼び出しをシミュレートしたいと思います。 1つのファイルを安心してアップロードできますが、複数のファイルをアップロードすることはできません。任意の助けをいただければ幸いです
File sheetFile = new File(sheetPath.get(0)); response = RestAssured. given(). headers(headers). formParameter("studentDetail", "{"+ "\"userId\" : "+PropFileHandler.readProperty("psUserId")+ ",\"institutionId\" : "+PropFileHandler.readProperty("institution_id")+ ",\"externalUserId\" : "+PropFileHandler.readProperty("user_id")+ ",\"tokenId\" : \"12000\""+ ",\"imagePathStatus\" : \"\""+ "}"). formParameter("clientType", getData("ps_bulk_upload_image.clientType")). multiPart("file", sheetFile). #here i want to upload multile files when(). post(relativePath). then(). statusCode(200). body(matchesJsonSchema(new File(test.cngActions.getJsonSchemaDirectoryPath()+ getData("ps_bulk_upload_image.schemaPath")))). extract().response();
:
後は、単一ファイルアップロードのための休息-保証コードです。