Skip to content

Duplicate /sites/{blog_id} path in upload directory still persists #243

Description

@christianwach

I have a multi-network which I converted from a legacy ms_files_rewriting structure to a default wp-content/uploads/sites/{blog_id} structure. I've been using a fork of this plugin that fixed the path duplication issue a while back.

For the first time in a while, I needed to create a new network, so decided to upgrade to version 3.0.0 of this plugin to see if this PR had indeed fixed the /sites/{blog_id}/sites/{blog_id} issue - but it doesn't seem to have done so - that was indeed how the new network was set up.

In fact the only solution that I can find (at least for compatibility with a default post WordPress 3.5 system) is to set upload_path and upload_url_path to an empty string. WordPress seems to handle the subdirectories just fine as long as upload_path is empty.

I don't really have solutions for the variants that must be out there now, i.e. networks with ms_files_rewriting, networks with UPLOAD defined, as well as networks with /sites/{blog_id}/sites/{blog_id} - but to implement /sites/{blog_id}, empty upload_path and upload_url_path options seem to be the way to go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions