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.

General Questions /

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

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

Change "assets" file path


Reply


3 Posts   354 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, 94 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!