Actions
Bug #71994
closedFluid Styled Content doesn't support rendering PDF previews in Upload-List
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid Styled Content
Target version:
Start date:
2015-12-01
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:
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>
Actions