mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 09:09:33 +00:00
Split attachment path into internal and external path, so the external source URL can be retained after a file is downloaded
This commit is contained in:
parent
5bb79b5419
commit
ceb7c7bd65
21 changed files with 399 additions and 303 deletions
|
|
@ -52,8 +52,8 @@ class AttachmentNormalizer implements NormalizerInterface, NormalizerAwareInterf
|
|||
$context[self::ALREADY_CALLED] = true;
|
||||
|
||||
$data = $this->normalizer->normalize($object, $format, $context);
|
||||
$data['internal_path'] = $this->attachmentURLGenerator->getInternalViewURL($object);
|
||||
|
||||
$data['media_url'] = $this->attachmentURLGenerator->getViewURL($object);
|
||||
//Add thumbnail url if the attachment is a picture
|
||||
$data['thumbnail_url'] = $object->isPicture() ? $this->attachmentURLGenerator->getThumbnailURL($object) : null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue