Hi i'm using gridfs to store file in mongodb, I'm facing a problem when i try to show the large pdf file in browser, which is saved in gridfs, large files doesn't showing in browser, but small files showing. this is my code, service public function getIpFileByFileId () { $request = $this -> request ; $dm = $this -> container -> get ( 'doctrine_mongodb' )-> getManager ( 'patient' ); $id = $request -> get ( 'fileId' ); //get doc $docIpMapping = $dm -> getRepository ( 'PatientDocumentsBundle:IPDocuments' )-> findOneBy ([ 'id' => $id ]); $base64 = ( base64_encode ( $docIpMapping -> getFile ()-> getBytes ())); $response [ 'data' ] = $base64 ; $response [ 'msg' ] = 'success' ; return $response ; } in front end Ajax ( path , data ). success ( function ( result ) { $ ( "#pdfD...
Comments
Post a Comment