broker : GWM
This commit is contained in:
parent
c7d68ad680
commit
95129d10c1
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user