I’d like to config my upload using /config/upload.php. However, some of my config items will vary depending on the situation. In most cases, the upload directory is dynamically set (e.g. it incorporates the user’s id, uses a random folder, etc.). Sometimes, the type of files that can be uploaded will be different (e.g. only photos in one case, only videos in another case).
Can I put the general config items in /config/upload.php and add/override certain things later? If so, how?
In your controller that you are using to upload you just need to redefine the options for the upload library and initialize them again.
You will lose all your predefined config items I’m pretty sure so you’ll need to redo those
UPDATE
After looking into this a little more this may be possible. If you look at the
Uploadlibrary there are functions inside where you cansetsome of the variables. There aren’tsetfunctions for all and they may not all be asetfunction that you can use. So you could do something like this.Others that look like can be used to set values