Closed elyukai closed 2 months ago
I think it still works as expected, but will double-check tonight. The official place to ask for support would be our support forum: https://forum.getkirby.com.
Oh, I'm sorry about the misplacement. 😬 I'll put it there first next time.
And thank you for looking into it! 🙌🏻☺️
Sorry for the delay, I tested the recipe again, and it works for me as expected. Your plainkit example only has the file url component but lacks all the rest described in the recipe, in particular the route which is crucial for this to work.
No worries, thanks for looking into it! 🙌🏻
Oh, okay, I was assuming that it wouldn't create a file already after just extending the file::url
component, since that's how I read this paragraph from that section:
If you delete the media folder now, and click on the file links again, you will see that this time no file copies will be generated anymore.
It does not mention that I need to follow the rest of the recipe for this to happen, so I assumed this would partially work as described there. Since in the next paragraph it also mentioned that I need a route, but only to hide the files from their standard URL.
Hi,
I hope this is the right place to address this. I previously asked on Discord, but this might just be the better place to discuss that.
I tried following along Protecting files, but I’m stuck at
file::url
component. The URL is correct, but the file is still copied to themedia
folder and it’s also being redirected to.I stepped into the code and could identify
Kirby\Cms\App:792
as the cause for the redirects. Did anything change in V4 in that regard? I figured out that the line was already present in V3, though.I tried to reproduce the issue just with the
plainkit
and the issue persists. I only added the minimumindex.php
plugin contents and an example file to test with. I attached the changed plainkit, if that helps identifying the issue.Maybe there’s something missing to make this work in V4?