Hi,
Is it possible to specify a target file name when using an image upload field in form_fields()?
I'd like to be able to save images on the server under a specific name (i.e. image_$id.jpg). If the only way to do this is through a hook, can someone give me a simple example of the code they would use in the hook?
Thanks!
Comments
.... $fields['image_upload']['filename'] = 'my_new_filename';
If the name is dependent on another fields value, say a field named "client", you can use "{client}" as a placeholder like so:
.... $fields['image_upload']['filename'] = '{client}_my_new_filename';
Keep up the excellent work! The more I use Fuel, the more I realize how great it is. Not only is Fuel a solid piece of work but you, sir, are an amazingly available and competent resource for this community you've built. Kudos to you!