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.

Archive /

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

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

Image not shown on pages and in administraton


Go to End
Reply


18 Posts   7056 Views

Avatar
nomen

Community Member, 52 Posts

12 September 2008 at 8:49pm

Edited: 12/09/2008 8:51pm

Hi:

Maybe [url=http://www.silverstripe.com/site-builders-forum/flat/9740?showPost=168909/]this[/url] 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