Image displaying continue
This commit is contained in:
@@ -77,8 +77,23 @@ class MMCController extends Controller
|
||||
*/
|
||||
public function show(Request $request, $id)
|
||||
{
|
||||
// $user = User::find($id);
|
||||
// return view('admin.users.show', ['user' => $user]);
|
||||
$project_id = $request->session()->get('project_id');
|
||||
$project = Project::find($project_id);
|
||||
|
||||
$mmc = MMC::find($id);
|
||||
$auk = $mmc->auks()->first();
|
||||
|
||||
$filePath = $project->mmc_path . '/' . $auk->auk_path . '/' . $auk->image_dir . '/' . $mmc->filename;
|
||||
if(strcasecmp(substr($mmc->filename, -3, 3), 'svg') == 0 )
|
||||
{
|
||||
// $svg = file_get_contents($filePath);
|
||||
// return response()->header('Content-Type', 'image/svg+xml')->file($filePath);
|
||||
// file($filePath)->header('Content-Type', 'image/svg+xml');
|
||||
}
|
||||
else
|
||||
{
|
||||
return response()->file($filePath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user