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.

Archive /

Our old forums are still available as a read-only archive.

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

new ImageField('Banner_Image') point to another directory in the Assets Folder


Go to End


10 Posts   6569 Views

Avatar
Liam

Community Member, 470 Posts

29 October 2008 at 3:32pm

Can anybody else confirm this is broken?

I've using 2.2.2 stable and cannot change the directory in which the images get uploaded.

Here is the complete line I'm using in my page type

$fields->addFieldToTab("Root.Content.Portrait", new ImageField('Portrait', null, null,null, null, 'images'));

Things still get uploaded into an 'uploads' directory, i.e the default one.

Avatar
typopunk

Community Member, 6 Posts

4 November 2008 at 9:04am

Edited: 04/11/2008 9:05am

Hello LeeUmm.
Yes, I can confirm that issue! It never worked for me too.
I just posted a way to work around this problem.
Maybe this is what you (and others) are looking for. :-) cu

Go to Top