Skip to content

Commit a1d41a0

Browse files
Consider Pimcore Frontend FullPath for File Output (#336)
Co-authored-by: Stefan Hagspiel <shagspiel@dachcom.ch>
1 parent ad6c2e3 commit a1d41a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FormBuilderBundle/Transformer/Output/DynamicMultiFileTransformer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ public function getValue(FieldDefinitionInterface $fieldDefinition, FormInterfac
4747
$asset = $this->attachmentStream->createAttachmentAsset($attachmentData, $fieldDefinition->getName(), $rootFormData->getFormDefinition()->getName());
4848

4949
if ($asset instanceof Asset) {
50+
$path = $asset->getFrontendFullPath();
51+
52+
if (str_starts_with($path, 'http')) {
53+
return $path;
54+
}
55+
5056
return sprintf('%s%s', \Pimcore\Tool::getHostUrl(), $asset->getRealFullPath());
5157
}
5258

0 commit comments

Comments
 (0)