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.

All other Modules /

Discuss all other Modules here.

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

Default upload folder with subsites (Modules: subsites, selectupload)


Go to End


2 Posts   732 Views

Avatar
tomys

Community Member, 4 Posts

13 March 2015 at 9:03pm

Hello,

we are a german sports club comunity with different departments (soccer, teenis, ...) .
We now migrate our homepage to silverstripe.

SS 3.1.9
Subsite 1.0.5 (1.0.6 does not work)

To separte the sports departments we choose the subsites modul, which works fine exept the upload and integration of images does not work with the subsite module.
!Sometimes! if a department member uploads a image within the HTMLeditor to the defaul Upload folder, the image can not selected after the upload.
It seems there is a problem in the subsites modul with the access to the _resampled folders.
If the images was upload by "Files" to a subsites specific folder (soccer) and then selected in the HTMLeditor all works fine.

I try to fix this for days now. With no luck!

Because our CMS policy says, that every department will have its own upload folder, so we want to use the "selectupload" Modul.

Please can you give me a hint, how to configure/modify the "selectupload" Modul, so that the DefaultFolderName for Upload is set to the name of the subsites description of the currentSubsiteID , or to a (new) value which is set in the subsites configuration.

Thanks in advance!

Regards,
Thomas

Avatar
Pyromanik

Community Member, 419 Posts

26 March 2015 at 12:20am

Edited: 26/03/2015 12:22am

I'm not sure I understand very well, but this might be of help: http://api.silverstripe.org/3.1/class-FileField.html#_setFolderName
You could update the config to set the default folder globally (for that session/request) after a user logs in perhaps