Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken URL for uploaded file in BE module #1014

Closed
kitzberger opened this issue Apr 19, 2024 · 1 comment
Closed

Broken URL for uploaded file in BE module #1014

kitzberger opened this issue Apr 19, 2024 · 1 comment
Labels

Comments

@kitzberger
Copy link
Contributor

When setting the upload folder to a non-public storage the URL that's being generated in the BE module looks like this:

https://example.org/https://example.org/index.php?eID=dumpFile&t=f&f=73&token=xxxxxxxxxx

Excerpt from EXT:powermail/Resources/Private/Partials/Module/List.html:

<a href="{vh:misc.link(path:'{vh:misc.getFileWithPath(path:\'{settings.uploadPath}\',fileName:\'{subValue}\')}', absolute:1)}" title="{settings.uploadPath}{subValue}" target="_blank">

So a concatination of the two viewhelper vh:misc.getFileWithPath and vh:misc.link(absolute:1). The latter is prefixing the URL independent of it being relative or already absolute. Due to the non-public storage the output of vh:misc.getFileWithPath is already absolute.

kitzberger added a commit to kitzberger/powermail that referenced this issue Apr 19, 2024
In case the file is placed inside a non-public storage the generated URL is already absolute and doesn't require any prefixing with scheme and hostname.

Resolves: in2code-de#1014
@mschwemer mschwemer added the v12 label May 21, 2024
@mschwemer
Copy link
Collaborator

Included in 12.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants