FIX #13343 Test ServiceClient instead of Presentation to return contents

as handler (to presenter) or base64 contents
parent 869ef605
Pipeline #7034 canceled with stages
......@@ -554,10 +554,12 @@ trait archiveAccessTrait
$binaryDataObject = \laabs::newInstance("recordsManagement/BinaryDataObject");
$binaryDataObject->attachment = new \stdClass();
if (\laabs::hasPresentation()) {
$binaryDataObject->attachment->data = $digitalResource->getHandler();
} else {
if (\laabs::isServiceClient()) {
// Returns base64 encoded contents for web service clients
$binaryDataObject->attachment->data = base64_encode($digitalResource->getContents());
} else {
// Let presenter stream the contents
$binaryDataObject->attachment->data = $digitalResource->getHandler();
}
$binaryDataObject->attachment->uri = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment