I am using Symfony 3 to create an API that receives a CSV file and reads it. This is my route:
/**
* Recive a file
*
* @Route("/get/file", name="get-file")
* @Method("POST")
* @param Request $request
* @return Response
*/
public function getFileAction (Request $request) {
return $this->json(array(
'status' => 'success',
'code' => 200,
'data' => $request,
));
}
I have created a Collection in Postman that calls me to this route and correctly returns the data:
I have tried to pass the CSV using the following form:
How can I send a CSV to an API using POSTMAN or another service?
How could I do some tests?