1.3.2releasedReflected Upload Field
An upload field that dynamically renames files (based on values from other fields in the same entry).
Clone URLhttps://github.com/twiro/reflecteduploadfield.git
Add as a submodulegit submodule add https://github.com/twiro/reflecteduploadfield.git extensions/reflecteduploadfield --recursive
Compatibility
2.x.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No | No | No | 1.1.0 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 | 1.3.2 |
Readme
Reflected Upload Field
An upload field for Symphony CMS that dynamically renames files (based on values from other fields in the same entry).
1. Installation
- Upload the
/reflecteduploadfield
folder in this archive to your Symphony/extensions
folder. - Go to System > Extensions in your Symphony admin area.
- Enable the extension by selecting the 'Field: Reflected File Upload', choose 'Enable' from the 'With Selected…' menu, then click 'Apply'.
- You can now add the 'Reflected File Upload' field to your sections.
2. Field Settings
Compared to Symphony's default upload field Reflected Upload Field comes with the following two additional settings:
- Expression represents the "formula" that's used to generate the reflected filename. You can either use static text or access other fields of the current entry via XPath:
{//entry/field-one} static text {//entry/field-two}
. - Create unique filenames gives you the option to add a unique token to the end of the generated filename. This random token will change whenever you save or resave an entry – so this option guarantees that the generated filenames won't get you into caching-troubles whenever you swap files in an entry.
3. Acknowledgements
This extension was initially developed by Simon de Turck and is based on the extensions Unique Upload Field and Reflection Field.
Version history
Symphony 2.4.x to 2.7.x
- Fixed broken error messages (#13)
- Removed obsolete function 'getUniqueFilename'
Symphony 2.4.x to 2.7.x
- PHP 7.4 compatibility
Symphony 2.4.x to 2.7.x
- PHP7 compatibility
- Symphony 2.7 compatibility
- Code cleanup
- Added clean file name to data source output
Symphony 2.3.3 to 2.5.x
- Added compatibility with Symphony 2.3.3
- File Path no longer saved as part of the file name
- Updated readme and licence
- Added compatibility with Symphony 2.3.0
- Fix when removing a file and not picking a new one
Requires Symphony 2.2.1