Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Image not shown on pages and in administraton

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

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

Page: 1 2 3
Go to End
Author Topic: 6745 Views
  • nomen
    Avatar
    Community Member
    52 Posts

    Re: Image not shown on pages and in administraton Link to this post

    Hi:

    Maybe this is usefull for you. I have similar problems and that solves them.

    bye

  • jcostian
    Avatar
    Community Member
    2 Posts

    Re: Image not shown on pages and in administraton Link to this post

    Hi,

    I had propably the same problem. The upload worked fine but even when I had changed the folder permissions the new uploaded file had only owner rw permissions and it didn't show in the internet. The resampling worked, but the original image could not be used. The owner was the same than the owner of the whole web folder.

    I was able to fix this by adding one line of code to Folder.php in sapphire/filesystem.
    In method addUploadToFolder I added chmod-command inside this if:

    if(file_exists($tmpFile['tmp_name']) && copy($tmpFile['tmp_name'], "$base/$file")) {
    // Update with the new image
    chmod("$base/$file", 0755);
    return $this->constructChild(basename($file));
    }

    6745 Views
Page: 1 2 3
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.