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.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.02.7.12.7.22.7.32.7.42.7.52.7.62.7.72.7.82.7.92.7.10
NoNoNo1.1.01.3.21.3.21.3.21.3.21.3.21.3.21.3.21.3.21.3.21.3.21.3.21.3.21.3.21.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

  1. Upload the /reflecteduploadfield folder in this archive to your Symphony /extensions folder.
  2. Go to System > Extensions in your Symphony admin area.
  3. Enable the extension by selecting the 'Field: Reflected File Upload', choose 'Enable' from the 'With Selected…' menu, then click 'Apply'.
  4. 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:

  1. 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}.
  2. 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

Symphony 2.3.0 to 2.3.2

  • Added compatibility with Symphony 2.3.0
  • Fix when removing a file and not picking a new one

Requires Symphony 2.2.1