0

I try to get CSRF token from my form to send it through Ajax response. This is my code:

$uploadForm = $this->createForm(new FilesUploadType(), new FilesUpload(), [ 'action' => $this->generateUrl('files_upload') ])->handleRequest($request);

I have tried to get that so:

$uploadForm->get('_token').getData();

But that doesn't works.

Razip
  • 155
  • 1
  • 12

0 Answers0