Project

General

Profile

Actions

Bug #99404

closed

Invalide relative path given by getPublicUrl()

Added by Florian Rival over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2022-12-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

On a FileReference, if you try to get the public Url with :

$myFile->getOriginalResource()->getPublicUrl()

you get a relative URL like this :

'/uploads/tx_myext/MyTestFile.pdf'

but this URL is prefixed with a slash and then cannot be used with functions like fopen()

Before TYPO3 V11, the method getPublicUrl() return a path like this :

'uploads/tx_myext/MyTestFile.pdf'

Actions

Also available in: Atom PDF