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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Change "assets" file path


Go to End


3 Posts   1012 Views

Avatar
JefersonPaz

Community Member, 3 Posts

14 December 2013 at 7:33am

Hi, i have 2 silverstripes installed, but I need them to share the same assets folder because the images are the same, how to i get one of them to do that?

I've changed couple files like core.php and other one but nothing happened. Can anyone help me?

Thanks!

Avatar
Bereusei

Community Member, 96 Posts

14 December 2013 at 8:36pm

You use anywhere a uploadfield? Try this:

$fields->addFieldToTab(
    'Root.Upload',  
    $uploadField = new UploadField(
        $name = 'GalleryImages',
        $title = 'Please upload one or more images'     )   
);
$uploadField->setFolderName('customfolder');

Avatar
JefersonPaz

Community Member, 3 Posts

17 December 2013 at 3:29am

I use in one of them, the other one (cms) was made to be static, using the content from the first one. All I need is to one of them to recognize the assets folder in another directory, not in the cms root. Thanks!