如何在Symfony中添加文件参数转发POST请求?

I need to forward a POST request in Symfony but before forwarding I need to convert an image from base64 to $_FILES parameter. How can I do this?

Are you submitting a form before you forward? If you are you can do:

if($form->isSubmitted() && $form->isValid){
    //Do whatever work you need to in here like uploading the image 
    // before the forward
    return $this->forward('@Bundle:action', array(
       'request' => $request));
}

As for converting your file take a look at the answer to this question. It should do the trick. Hope this helps!