Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
38806b22
Commit
38806b22
authored
Feb 26, 2020
by
Cyril Vazquez
Browse files
Merge branch 'fix/13343_Read_Resource_from_API' into 'master'
Fix/13343 read resource from api See merge request
!431
parents
ccdaca4d
b7ce00ee
Pipeline
#7036
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bundle/recordsManagement/Controller/archiveAccessTrait.php
View file @
38806b22
...
...
@@ -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
=
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment