Enables files to be uploaded into a user-designated folder

Installs: 74 980

Dependents: 1

Suggesters: 0

Security: 0

Stars: 26

Watchers: 12

Forks: 10


2.1.0 2023-09-01 18:40 UTC

This package is auto-updated.

Last update: 2024-03-01 00:11:44 UTC




This module introduces an extended version of the UploadField, called SelectUploadField. This allows users to select the folder that they wish to upload newly added files to, rather than forcing users to upload to a pre-configured folder.

The folder selection will be remembered for that user, so that if they are uploading files across multiple pages or data-objects they will only need to change this value if they wish to change the destination folder.


If you have composer you can install using composer require silverstripe/selectupload:*

Otherwise, download the project as a zip archive and extract into the selectupload folder.


In your project you can use the SelectUploadField field as a substitute for UploadField.

$field = SelectUploadField::create('MyImage', 'My Image')
	->setFoldername('Parent/Subfolder') // set a good default folder
	->setCanSelectFolder('ADMIN') // So that only important people can select any folder

If you wish to replace ALL instances with this field type, you can simply use dependency injection to specify a custom class

In your mysite/_config/config.yml

Name: mysettings
    class: SilverStripe\SelectUpload\SelectUploadField

This field appears as below:

Sample SelectUploadField