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
FilePreview: File URL links to the media folder directly #3201
Comments
Is this another case where we shouldn't copy the image over to |
No, this is not about where the image is actually stored. If the link target is the public file URL, Kirby will dynamically redirect to the current media URL. So it's just about the link that's displayed in For content files we do need to store a copy in |
I'm trying to make up my mind... but somehow both feels right and wrong. |
I looked into the code again: Even if the |
Wait, it's the other way around probably. Our default But I think we should solve this by fixing the redirect in |
Eventually, we will have to tackle the |
Yeah, to be honest I don't fully grasp how it all interconnects at the moment. |
While the file::url file::version horror definitely needs to be fixed, this one is really easy to solve in the Panel. We should indeed use the shortcut URL to avoid such copy issues. |
✅ |
The
Url
link in the FilePreview component currently displays the "public" URL (/path/to/page/file.jpg
), but links to the media folder (because that's what the defaultfile::url
component returns). If users now copy that link, the link will contain the media hash and will therefore not be permanent.I think the link target should always be the public URL of the file. But of course this could break setups with a custom
file::url
component. What do you think?The text was updated successfully, but these errors were encountered: