The MU forums have moved to WordPress.org

Upload Path option in Edit Blogs has no effect (3 posts)

  1. kilwag
    Member
    Posted 14 years ago #

    Like the title says, I can change the "Upload Path" option of the individual blogs

    (as found in blogs > edit blog > Blog options > Upload Path)

    and it appears to save the setting, and then totally ignore it. Images are still uploaded to the default path. No error messages.

  2. Person
    Member
    Posted 14 years ago #

    Yeah, I ran into the same problem when I was trying to get change the location of where files were stored. From what I could tell, Upload Path, Upload Url Path, and Fileupload Url had no effect on any of it.

    My motivation for changing the location was because on the server I use, the subfolder blogs.dir/blogid/files/ would be owned solely by Apache, rendering it impossible for users to upload files. What I did to fix this was first modify wp-settings.php, then wp-includes/wpmu-functions.php, and I also added a new rewrite rule in .htaccess (but I don't think this is necessary if you keep the short url of domain.com/blog/files/... ~ blog.domain.com/files/...). While I was at it, I also changed the use of the blogid for user folders, and changed it to the name of their url path (i.e. /blogs.dir/namepath/), which makes it easier for me as admin to easily identify what folder belongs to who.

    If you only wanted to change the upload path for a single blog, then the quickest way would be to just add an if statement checking the blog's id and changing the upload location accordingly. A better solution would be to change the code and make it query the database, requesting the upload path for that blog, and if none exists, to use a predefined location. (unless someone has a more viable solution?)

  3. eddihughes
    Member
    Posted 14 years ago #

    Pearson, I am trying to figure this out too.

    I want /blogs.dir/blogid/files (sub.domain.com/files) to reflect a custom directory for each blog. For example,

    /blogs.dir/blogid/resources (sub.domain.com/resources)
    /blogs.dir/blogid/files (sub.domain.com/files)

    Is this possible?

About this Topic

  • Started 14 years ago by kilwag
  • Latest reply from eddihughes