• Can someone explain the meaning of the following settings?
    – Upload Path
    – Upload Url Path
    – Fileupload Url

    The reason I ask is this:
    On my multisite setup, on the third blog I changed Upload Path to ‘wp-content/blogs.dir/3/images’, but when I upload a new image, it still is saved into wp-content/blogs.dir/3/files.
    Furthermore, when I change both Upload Url Path and Fileupload Url (can someone explain the difference?) to https://blog3.domain.com/images, it can’t the files. And yes, I changed the .htaccess accordingly.

    Is this a bug, or am I not using the correct settings?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Why are you trying to change the location of file uploads? What’s the end goal with this?

    Thread Starter Ooypunk

    (@ooypunk)

    We no longer desire to change to location of the uploads, but the other question remains. My boss requires files to be in the /images directory (so domain.com/images), because all our other sites have the files in /images.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    My boss requires files to be in the /images directory (so domain.com/images), because all our other sites have the files in /images.

    That would be called ‘Changing the location of file uploads’

    WordPress uses /files/ instead of /images/ and … there isn’t a great way to do this (and actually I strongly suggest you not, unless there’s a compelling code reason). I would go back and tell my boss that the standard is /files/ because you may not always upload images.

    Thread Starter Ooypunk

    (@ooypunk)

    I may have found a workaround, I would like to hear your opinion on this.

    1. I changed RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] into RewriteRule ^images/(.+) wp-includes/ms-files.php?file=$1 [L]
    This way WP can still distinguish the files of separate blogs, and we get our /images directory (virtually).
    2. As changing Fileupload Url does nothing (*), I dug in and put this in functions.php:

    function filter_attachment_url($url=""){
    	$url = str_replace('/files/', '/images/', $url);
    	return $url;
    }
    add_filter('wp_get_attachment_url','filter_attachment_url');

    (*) I still think having options in the settings that don’t work is a bit silly.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    They do work, just not the way you’re thinking they do.

    Thread Starter Ooypunk

    (@ooypunk)

    Could you enlighten me, please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multisite upload path’ is closed to new replies.