Project

General

Profile

Actions

Bug #71994

closed

Fluid Styled Content doesn't support rendering PDF previews in Upload-List

Added by Florian Schaeffer over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid Styled Content
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>


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #71502: Fluid Styled Content does not render PDFs in frontend.ClosedLars Peter Søndergaard2015-11-12

Actions
Actions #1

Updated by Gianluigi Martino over 8 years ago

  • Assignee deleted (Benni Mack)

How to reproduce this?
Witch content element you use?

Actions #2

Updated by Gianluigi Martino over 8 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Daniel Goerz over 8 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.

Actions #4

Updated by Gerrit Code Review over 8 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

Actions #5

Updated by Daniel Goerz over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF