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

Image not shown on pages and in administraton


Go to End


18 Posts   8628 Views

Avatar
nomen

Community Member, 52 Posts

12 September 2008 at 8:49pm

Edited: 12/09/2008 8:51pm

Hi:

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

bye

Avatar
jcostian

Community Member, 2 Posts

16 September 2008 at 6:49pm

Edited: 16/09/2008 6:57pm

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));
}

Go to Top