Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » image upload folder

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

Page: 1
Go to End
Author Topic: 857 Views
  • marcink
    Avatar
    Community Member
    89 Posts

    image upload folder Link to this post

    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

  • banal
    Avatar
    Community Member
    901 Posts

    Re: image upload folder Link to this post

    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.

  • marcink
    Avatar
    Community Member
    89 Posts

    Re: image upload folder Link to this post

    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.

    857 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.