diff --git a/src/Form/Field/File.php b/src/Form/Field/File.php index 3c0a9e8ae4..1cd0d55741 100644 --- a/src/Form/Field/File.php +++ b/src/Form/Field/File.php @@ -244,8 +244,14 @@ public function render() $this->setupDefaultOptions(); if (!empty($this->value)) { - $this->attribute('data-initial-preview', $this->preview()); - $this->attribute('data-initial-caption', $this->initialCaption($this->value)); + + /* + * Dont show upload path/url for security reaseon + */ + if (!$this->hidePreview()) { + $this->attribute('data-initial-preview', $this->preview()); + $this->attribute('data-initial-caption', $this->initialCaption($this->value)); + } $this->setupPreviewOptions(); /*