Skip to content

Support async image checks in CreateIIIFURL

https://redmine.teklia.com/issues/10673

A new RQ task should allow to run Image.perform_check on a new dedicated iiif RQ queue.

The CreateIIIFURL endpoint should include two optional width and height fields mapping to Image.width and Image.height. Either are set at once, or none are, otherwise an HTTP 400 is returned.

A new User.can_validate_images user permission and an ImageServer.allow_external_validation boolean field should be added, both defaulting to False and including a help_text to explain what they are.

When both width and height are set, if either the user permission and server attribute are not set, an HTTP 400 is returned. When all the attributes are True, then the image is created immediately with both sizes set, but still left unchecked, and perform_check is called through the asynchronous task instead.

The API documentation should explain how to use width and height, mention the new permission and server option, and warn against doing this if you don't know what you are doing.