Answer the question
In order to leave comments, you need to log in
How to transfer a pdf file from a request to the browser's built-in adobe reader?
What to write in the view so that, upon request for a file, it is not saved on the PC, but opened in a new browser window using adobe reader or whatever it can do ... there is a
path to the file with the extension, and then the fog
$filename = Yii::getAlias ('@app').'/web/'.$file;
Answer the question
In order to leave comments, you need to log in
use the sendFile method of the Response object
Yii::$app->response->sendFile ( $filename, 'File in browser', ['inline' => true]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question