grav-plugin-form
grav-plugin-form copied to clipboard
Support @data: prefix for file field destinations
The file field destination
property currently supports @self:
, @page:
, and @theme:
prefixes. I guess these are focused on use within blueprints. In userland, I generally save files under user/data
and it would be cool to have this as a prefix.
I know user/data
isn't a lot of typing. This is another one of those things that doesn't quite work in multisite setups, so a failsafe prefix would cover making it work in that kind of deployment, as opposed to user/sites/mysite/data
. It might prevent brittle hardcoding in other contexts too, not sure.
For further context, I find it handy to use multisite setups to demo sites for clients, especially those without a spare domain. All going well, I move them over to single site deployment. In my perfect world, I'd minimise the tweaking and gotchas in that step.
I am happy to attempt a PR if you are happy with this but don't see it as a priority.
Destination supports also user-data://my-folder
, you should use that instead. It will automatically work in multi-site environments if you setup it correctly.
So does destination
support any stream? I want to update the docs because having this knowledge here is inadequate.
So does
destination
support any stream?
Just noticed #119 which answers my own question. It would be great and ultimately time-saving if new features like this could be added to docs as they are added. You're just creating tech support debt otherwise.
Edit to add to this: if I don't have time, I add it to my documentation todo list to make sure it doesn't get overlooked forever.
Submitted PR to grav-learn now and don't need the originally requested feature, so happy for you to close this issue if you don't plan to implement it. Up to you.