-
Notifications
You must be signed in to change notification settings - Fork 44
[FINNA-3167] IIIF manifest generator #3384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FINNA-3167] IIIF manifest generator #3384
Conversation
Add a IIIFManifest action in RecordController. It generates a IIIF Presentation API v3 manifest for internal use. This is not intended to be exposed in the Finna API or as a user-discoverable resource. * Pixel size is unavailable in metadata, so it is omitted, even though the Presentation API spec requires it. * Because images are served over Cover/Show, they are all already image/jpeg, so we hard-code the MIME type * Configurable CORS headers with '*' default See https://iiif.io/api/presentation/3.0/
8c0ee11 to
c7cd8b6
Compare
|
Entä pitäisikö olla |
9ccf2f0 to
483a257
Compare
483a257 to
3fbb352
Compare
module/Finna/src/Finna/Record/IIIF/IIIFManifestGeneratorFactory.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Ere Maijala <ere.maijala@helsinki.fi>
|
Mitäs me tehdään sen redirectin kanssa, jota ehdotin Slackissä? Luonnostelin jotain tällaista: protected function iiifManifestAction()
{
$response = $this->getResponse();
$headers = $response->getHeaders();
$driver = $this->loadRecord();
if($datasourceManifests = $driver->tryMethod('getIiifManifests')) {
$headers->addHeaderLine('Location', $datasourceManifests[0]['url']);
$response->setStatusCode(301);
return $response;
}
/* jne. */edit: Varmaan 302 parempi itse asiassa. |
Joo, 302 on parempi. Ja toteutus on ok. |
This is in anticipation of later unit testing. Now createManifest() does not require a RecordDriver as input, so it will require no complicated mocking to unit test.
Add a IIIFManifest action in RecordController. It generates a IIIF Presentation API v3 manifest for internal use. This is not intended to be exposed in the Finna API or as a user-discoverable resource.
See https://iiif.io/api/presentation/3.0/