Skip to content

Commit f3e3fcb

Browse files
Merge pull request #35 from neos/bugfix-33
BUGFIX: Preventing the Rendering of UploadedResourcePreview
2 parents c160c99 + 6bf4fc0 commit f3e3fcb

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Resources/Private/Fusion/Elements/FileUpload.fusion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ prototype(Neos.Form:FileUpload) < prototype(Neos.Form.FusionRenderer:FormElement
1111
}
1212
content = ${elementValue.fileName}
1313
@if.hasUploadedResource = ${elementValue ? true : false}
14+
@if.hasNoValidationErrors = ${!elementHasValidationErrors}
1415
}
1516
uploadedResourceHiddenField = Neos.Fusion:Tag {
1617
@position = 'before field'

Resources/Private/Fusion/Elements/ImageUpload.fusion

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ prototype(Neos.Form:ImageUpload) < prototype(Neos.Form.FusionRenderer:FormElemen
1414
maximumWidth = 200
1515
}
1616
@if.hasUploadedImage = ${elementValue ? true : false}
17+
@if.hasNoValidationErrors = ${!elementHasValidationErrors}
1718
}
1819
uploadedImageHiddenField = Neos.Fusion:Tag {
1920
@position = 'before field'
@@ -29,6 +30,7 @@ prototype(Neos.Form:ImageUpload) < prototype(Neos.Form.FusionRenderer:FormElemen
2930
tagName = 'input'
3031
attributes {
3132
type = 'file'
33+
accept = ${Neos.Form.FusionRenderer.getAcceptFromAllowedExtensions(element.properties.allowedTypes)}
3234
name = ${elementName + '[resource]'}
3335
}
3436
}

0 commit comments

Comments
 (0)