broker : GWM

This commit is contained in:
Gowtham M 2025-12-11 10:37:37 +05:30
parent c7d68ad680
commit 95129d10c1

View File

@ -447,7 +447,16 @@ class PolicyController extends ResourceController
}
return $this->respond(['status' => 'success', 'code' => 200, 'data' => $publicUrl ], 200);
// return $this->respond(['status' => 'success', 'code' => 200, 'data' => $publicUrl ], 200);
// Detect the file mime type
$mime = mime_content_type($filePath);
// Stream file to browser / Flutter
return $this->response
->setHeader('Content-Type', $mime)
->setHeader('Content-Disposition', 'inline; filename="' . $fileRecord[$fileColumn] . '"')
->setBody(file_get_contents($filePath));
} catch (\Exception $e) {