An upload field that makes use of configuration and keywords for determining the upload target
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_config
code/forms
.editorconfig
.gitattributes
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE.md
README.md
changelog.md
composer.json

README.md

SilverStripe Context Aware Upload Field

Requirements

  • SilverStripe ^3.1

Installation

The recommended way to install the module is via composer

composer require marketo/contextawareuploadfield:dev-master

If you aren't using composer, pull down the code into its own directory.

Examples

To add this to a Page object, you can put the following code into your YAML configuration.

ContextAwareUploadField:
  upload_paths:
    Page: some/location/$ClassName/$URLSegment

The segments in the URL directly correspond to fields in the database. The location will always be under assets.


If you wish to override all UploadField instances, you can use the following code.

Injector:
  UploadField:
    class: ContextAwareUploadField

Run a dev/build?flush=1 to flush the config manifests to enable the new configuration.

License

See License

Maintainers

Bugtracker

https://github.com/Marketo/SilverStripe-ContextAwareUploadField/issues