Fixed broken file field preview when using streams in the path

This commit is contained in:
Matias Griese
2020-06-04 23:27:14 +03:00
parent a9defec21b
commit 80b1c331b3
2 changed files with 3 additions and 2 deletions

View File

@@ -6,7 +6,8 @@
* Added new `onAdminListContentEditors` event to add a custom editor to the list of available
1. [](#bugfix)
* Use `Pages::find()` instead of `Pages::dispatch()` as we do not want to redirect out of admin
* Fixed broken `parent` field when using the old pages
* Fixed broken `parent` field when using the old pages
* Fixed broken `file` field preview when using streams in the path
# v1.10.0-rc.11
## 05/14/2020

View File

@@ -35,7 +35,7 @@
{% set blueprint_name = type ~ '/' ~ blueprint_name %}
{% endif %}
{% set blueprint = base64_encode(blueprint_name) %}
{% set real_path = value.thumb ?? global.context.media[path].relativePath ?? global.form.getPagePathFromToken(path) ?? global.admin.getPagePathFromToken(path) %}
{% set real_path = (value.thumb ?? global.context.media[path].relativePath ?? global.form.getPagePathFromToken(path) ?? global.admin.getPagePathFromToken(path))|ltrim('/') %}
{% set remove = global.file_task_remove ? global.file_url_remove : uri.addNonce(
global.file_url_remove ~