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.

All other Modules /

Discuss all other Modules here.

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

KickAssets: Set Upload Folder

Go to End

2 Posts   974 Views


Community Member, 80 Posts

23 December 2011 at 2:47pm

So, has anyone attempted to set the upload folder after utilizing the KickAssets feature by UncleCheese?

My files now seem to just be sent to my "uploads" folder and not the folder specified. Any thoughts?

class FeaturedEventsPage extends Page {
    static $db = array(
		'Headline' => 'Text',
		'SubText' => 'Text',
		'NoticeDateFrom' => 'Date',
		'NoticeDateTo' => 'Date',
		'NoticeActive' => "Enum('Active, Inactive','Active')",
    static $has_one = array(
   'ImageCover' => 'File'
	 function getCMSFields() {
      $fields = parent::getCMSFields();
	   $fields->addFieldToTab("Root.Content.Main", new TextField('Headline'), 'Content');
	  	  $fields->addFieldToTab("Root.Content.Main", new TextField('SubText'), 'Content');
		  $fields->addFieldToTab("Root.Content.Main", new DatePickerField('NoticeDateFrom'), 'Content');
		  $fields->addFieldToTab("Root.Content.Main", new DatePickerField('NoticeDateTo'), 'Content');	 
		  $fields->addFieldToTab("Root.Content.Main", new DropdownField( 'NoticeActive' , 'This Featured Event Is...', array( 
				'Active' => 'Active', 
				'Inactive' => 'Inactive'	
				),$this->NoticeType), 'Content'); 	
		   $fields->addFieldToTab("Root.Content.ImageCover", new FileAttachmentField('ImageCover', null, null, null, null, "FeaturedEventCovers")); 
		  return $fields;


Community Member, 136 Posts

16 October 2012 at 1:22am

Did you ever get this sorted? I'm trying to set the default folder for uploads via Kickassets and can't get it working.