Currently, the save() function behaves slightly differently when using a disk versus not using one. This PR resolves the inconsistency by creating a temporary file during saving.
Example of the issue:
Pdf::view('invoice')->save('invoice.png'); // Saves a PNG file
Pdf::view('invoice')->disk('s3')->save('invoice.png'); // Saves a PDF file
Using $fileName instead of $path directly to avoid any errors when saving to a full path.
Currently, the save() function behaves slightly differently when using a disk versus not using one. This PR resolves the inconsistency by creating a temporary file during saving.
Example of the issue:
Using
$fileName
instead of$path
directly to avoid any errors when saving to a full path.