Bug #71994
closedFluid Styled Content doesn't support rendering PDF previews in Upload-List
100%
Description
The Upload.html - fluid template uses f:image to render the preview instead of f:media (like it is done in Text & Media). The result is a link surrounding an image tag which has a direct src="<correctfilename>.pdf" attribute.
By exchanging the fluid-Template (and using f:media instead of f:image the PDF preview is rendered correctly.
Old Resources/Private/Templates/Content/Upload.html:
<f:if condition="{data.uploads_type} == 2"> <f:if condition="{f:uri.image(src: 'file:{f:if(condition: file.originalFile, then: \'file:{file.originalFile.uid}\', else: \'file:{file.uid}\')}')} != '/'"> <f:then> <a href="{file.publicUrl}"> <f:image src="{file.uid}" treatIdAsReference="{f:if(condition: file.originalFile, then: '1', else: '0')}" width="150" alt="{file.properties.alternative}" /> </a> </f:then> <f:else> <img src="{f:uri.resource(path: 'Icons/FileIcons/{file.extension}.gif', extensionName: 'frontend')}" alt=""> </f:else> </f:if> </f:if>
New:
<f:if condition="{data.uploads_type} == 2"> <f:if condition="{f:uri.image(src: 'file:{f:if(condition: file.originalFile, then: \'file:{file.originalFile.uid}\', else: \'file:{file.uid}\')}')} != '/'"> <f:then> <a href="{file.publicUrl}"> <f:media file="{file}" width="150" alt="{file.properties.alternative}" /> </a> </f:then> <f:else> <img src="{f:uri.resource(path: 'Icons/FileIcons/{file.extension}.gif', extensionName: 'frontend')}" alt=""> </f:else> </f:if> </f:if>
Updated by Gianluigi Martino almost 9 years ago
- Assignee deleted (
Benni Mack)
How to reproduce this?
Witch content element you use?
Updated by Gianluigi Martino almost 9 years ago
- Status changed from New to Needs Feedback
Updated by Daniel Goerz almost 9 years ago
- Status changed from Needs Feedback to Accepted
- Target version changed from 7 LTS to Candidate for patchlevel
This is still a valid bug and should be fixed. I'll upload a patchset that will create a preview even for audio, video and online media assets by using the media view helper as suggested.
Updated by Gerrit Code Review almost 9 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45081
Updated by Daniel Goerz almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 04c718f88c29b78b94f1f749116959be1a7ff197.