fix: explicitly declare content type im /api/image
This commit is contained in:
parent
1839181887
commit
4868f5e016
|
@ -22,6 +22,7 @@ class ApiController extends \yii\rest\Controller
|
|||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
$response->headers->set('Content-Type', $img->mime);
|
||||
$response->headers->set('X-Image-Data', json_encode($img->getAttributes()));
|
||||
return $response->sendFile(env('UPLOADS_PATH') . '/' . $img->sha256, $img->original_name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue