Create upload dirs with same perms as wp-content. fixes #1784 #1726

git-svn-id: https://develop.svn.wordpress.org/trunk@2967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-10-28 01:12:54 +00:00
parent 305c29d4e1
commit 471552766e
2 changed files with 8 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ while ( file_exists($uploads['path'] . "/$filename") )
$file = $uploads['path'] . "/$filename";
if ( false === move_uploaded_file($_FILES['image']['tmp_name'], $file) )
die('The uploaded file could not be moved to $file.');
chmod($file, 0775);
chmod($file, 0666); // FIXME: Need to set this according to rw bits on parent dir.
// Compute the URL
$url = $uploads['url'] . "/$filename";