1

I need view a pdf file in browser - which store in my Storage. But I can not set the page title by file name, it display a name what I don't know where it from. My file name is TestPDFFile_1.pdf

Can someone help me?

enter image description here

here is my code

$folderName = config('filesystems.folder_test');
$fileName = $file->name;

$file = Storage::disk('s3')->get($folderName . "/" . $fileName);

$response = Response::make($file, 200);
$response->header('Content-Type', 'application/pdf');
$response->header('Content-Disposition', 'inline; filename="'.$fileName.'"');

return $response;
Manh Nguyen
  • 429
  • 1
  • 11
  • 21

0 Answers0