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

Restricting assets SS indexes


Go to End


6 Posts   1210 Views

Avatar
WandL

Community Member, 9 Posts

13 February 2014 at 2:04pm

Hi All,

I was wondering if there is a way to stop some folders/files being indexed by SilverStripe (3.1) when they are stored in the assets folder, we have files that are uploaded and extracted, the extracted folder I do not want this indexed automatically,

Any ideas appreciated.

Avatar
(deleted)

Community Member, 473 Posts

13 February 2014 at 2:30pm

The easiest way is to start the name of the folder with an underscore.

Avatar
WandL

Community Member, 9 Posts

13 February 2014 at 2:33pm

Okay thanks Simon didn't know that, is that in the documentation?

And the hard way? :)

Avatar
WandL

Community Member, 9 Posts

13 February 2014 at 3:22pm

Hi I just tried that and it doesn't work creating a folder with an leading underscore like '_foldername' still gets indexed by Silverstripe in Files.

Any other ideas?

Avatar
Devlin

Community Member, 344 Posts

14 February 2014 at 12:58am

Edited: 14/02/2014 1:01am

Yes. The leading underscore doesn't work anymore... in favour of a hardcoded '_resampled' or '_combinedfiles'... though not sure why...

You can use the dot as the prefix (.myfolder) or you can define your own blacklist pattern:

e.g.

# blacklist the underscore
Filesystem:
  sync_blacklisted_patterns:
    - '/^\_/'

Avatar
WandL

Community Member, 9 Posts

14 February 2014 at 11:11am

Hi Devlin, thank you that worked at treat!