Search code examples
phpsymfonyvichuploaderbundle

vich_uploader.download_handler / StreamedResponse get file instead of response


I try get file from FTP filesystem

 $this->container->get('vich_uploader.download_handler')->downloadObject($file,'file');

this return StreamedResponse

How i can get file instead of stream, there exist method in vich_uploader get file ?

(I must download file from ftp storage and create new file localy so need binary and put it as new file)


Solution

  • ok, it is easy from gaufrette

      $filesystem = $this->container->get('gaufrette.product_uploads_ftp_fs_filesystem');
    
    $filesystem->read($file->getOriginalName())