Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\EquipmentFile;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* Strumieniowanie załączników wyposażenia (BLOB z seg_equipments_files) -
|
||||
* wspólne dla wszystkich katalogów na seg_equipments (kable/orurowanie/
|
||||
* opomiarowanie). Podgląd/pobranie pliku po EQF_ID.
|
||||
*/
|
||||
class EquipmentFileController extends Controller
|
||||
{
|
||||
public function file(EquipmentFile $file): Response
|
||||
{
|
||||
return response($file->EQF_FILE ?? '', 200, [
|
||||
'Content-Type' => $file->EQF_FILE_TYPE ?: 'application/octet-stream',
|
||||
'Content-Disposition' => 'inline; filename="'.($file->EQF_FILE_NAME ?: 'plik').'"',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user