Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

ss3 gallery - upload all images at once

Go to End

10 Posts   3680 Views

Optic Blaze

Community Member, 190 Posts

12 August 2013 at 12:17am

Hi there,

I have packaged a version that works for SS 3.05 with the bulk editing and upload modules as well see here:

You can also check out it on Github:

Hope it helps


Community Member, 99 Posts

3 October 2013 at 2:18am

i have a similar setup to

its all working fine except the bulk upload option. its says its uploaded and i click save and then save and finish and the data objects get added, but no images are uploaded.

If i add one at a time it works fine.


class ClientImage extends DataObject {

	public static $db = array(	
		'Title' => 'Varchar',
		'LinkUsage' => 'Text',
		'IconHyperLink' => 'Text',
		'SortOrder' => 'Int'
	public static $has_one = array(
	    'Image' => 'Client_Image',
	    'ClientPage' => 'ClientPage',	
  	static $singular_name = 'ClientImage';
  	static $plural_name = 'ClientImages';
	public function getCMSFields() {
 		$fields = parent::getCMSFields();
		$uploadField =new UploadField('Image','Gallery Image'));
		$fields->addFieldToTab('Root.Main', new OptionsetField(
		 $name = 'LinkUsage',
		 $title = 'Link Usage',
		 $source = array('NONE' => "NONE", 'External' => "EXTERNAL"), 
		 $value = "1"
		$ExternalURLField = new TextField('IconHyperLink', 'HyperLink');
		$fields->addFieldToTab('Root.Main',$ExternalURLField );
		return $fields;		

	public static $summary_fields = array( 
       'ID' => 'ID',
	   'Title' => 'Title',
	   'Thumbnail' => 'Thumbnail',   
	public function getThumbnail() { 
   	return $this->Image()->CMSThumbnail();

class Client_Image extends Image {
	static $db = null;
	function generateRatioClientImage($gd) {
	return 	$gd->resizeRatio(370,185);  	


class ClientPage extends Page {

	public static $db = array(

	public static $has_one = array(
	public static $has_many = array(
		'ClientImages' => 'ClientImage'
	static $icon = "mysite/images/icons/clients.png";
  	static $description = 'Page with images holder for clients';
  	static $singular_name = 'ClientPage';
  	static $plural_name = 'ClientPages';
	public function getCMSFields() {
   		$fields = parent::getCMSFields();

  			$gridFieldConfig = GridFieldConfig_RecordEditor::create(); 
  			$gridFieldConfig->addComponent(new GridFieldBulkEditingTools());
  			$gridFieldConfig->addComponent(new GridFieldBulkImageUpload());   
  			$gridFieldConfig->addComponent(new GridFieldSortableRows('SortOrder'));    
  			$gridfield = new GridField("ClientImages", "Client Images", $this->ClientImages()->sort("SortOrder"), $gridFieldConfig);
  		$fields->addFieldToTab('Root.ClientImages', $gridfield);
  		return $fields;


class ClientPage_Controller extends Page_Controller {

	public static $allowed_actions = array (

	public function getClientImages() {
		return $this->ClientImages()->sort("SortOrder");
	public function init() {



Go to Top