This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
In the changelog I find this:
Build 342
Theme customization data now supports file uploads.
Jun 01, 2016
Can someone provide some more inside in how this should work? Mostly I am wondering where would the uploaded file then be stored? I am hoping in the theme directory, so that with version control the customization for a client could be saved eg.
When I use it like this in theme.yaml:
image:
label: Image
type: fileupload
images end up in /storage/app/uploads.
Maybe there is some configuration parameter to set path, but I haven't found any.
PS: But from my point of view, this is ok as I don't want this dynamic files be part of my theme.
Thank you very much Janek!
Your reason not wanting those 'user content/media' in the theme I understand. But how about getting your client's theme in version control? I thought that I if I could store the theme directory in Git, with all the customizations for the client, that would be the solution. This way I could have a staging area (on a different site/server) and push and pull the contents of the theme directory to the production site/server.
Perhaps you know how this could be done in a good practice kind of way?
I think the main reason for fileupload
field is to allow clients themselves to customize the theme.
When I work on project, I add all assets by hand into /assets folder. So I have full control over every part of theme and also git allows me to track changes.
If you want to allow your client to change (eg. banner) image later, I think you can add fileupload
field and add some {if}
inside your theme Page/Layout to replace default image with client's one.
But this is my way of work and it doesn't have to be the "best one" :)
Janek thank you for your effort! I think your solution is a good practice for many scenarios... i am figuring out if it suits mine.
Do you work with staging area? (or) How would you plan that kind of work-flow?
I am quite new to October/Laravel so my workflow is still very influenced with previous system (Nette framework).
I am using Netbeans to edit files and to work with GIT. I use staging area very rarely - and that is probably not very good habit - and rather committing every small change.
Once the project is at clients/production server, changes are matter of data backups, not version control - so when something goes wrong (client deletes something), it's always about recovery from (good) backups.
Maybe some weeks later I can talk about how to work with October/Laravel. Right now - it's me, who has more questions than answers :)
1-8 of 8