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

image upload folder


Go to End


3 Posts   1426 Views

Avatar
marcink

Community Member, 89 Posts

26 April 2009 at 4:01am

hi,

i'm trying to change the upload folder for an ImageField. here's the code:
$fields->push(new ImageField("Logo", null, null, null, null, "assets/Uploads/AttachedFiles/MyImages/logos/"));

but ss uploads the image always to "assets/Uploads"

i checked the rights on the folder, and it is 777.

any advise?

thanks

Avatar
bummzack

Community Member, 904 Posts

26 April 2009 at 4:49am

Hi marcink

Are you using SilverStripe 2.2.x by any chance? This sounds a lot like a bug I filed a while ago: http://open.silverstripe.org/ticket/2712
If you're indeed running 2.2.x, then the description in that bug report should help to fix your issue.

Avatar
marcink

Community Member, 89 Posts

26 April 2009 at 6:02am

Edited: 26/04/2009 6:42am

hi banal,

sorry, forgot to mention: no, ss 2.3.1

and one more thing: it seems that the path is written correctly in cms. because after uploading, the image isn't visible in ImageField.
but when i move it manually to the correct folder, it shows up.