[wp-trac] [WordPress Trac] #22469: Remove trailing slash from UPLOADS constant
WordPress Trac
noreply at wordpress.org
Thu Nov 15 21:45:42 UTC 2012
#22469: Remove trailing slash from UPLOADS constant
-----------------------------+--------------------------
Reporter: jbrinley | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Media
Version: trunk | Severity: critical
Keywords: |
-----------------------------+--------------------------
When building the uploads URL for multisite, {{{wp_upload_dir()}}} does
this:
{{{
$url = str_replace( UPLOADS, 'files', $url );
}}}
Problem is, {{{UPLOADS}}} has a trailing slash; {{{$url}}} does not. That
means that all image URLs look like http://example.com/wp-
content/blogs.dir/123/files/YYYY/MM/image-file.png
I'm not sure if {{{UPLOADS}}} should be set without the trailing slash, or
if {{{wp_upload_dir()}}} should {{{untrailingslashit()}}} before doing the
{{{str_replace()}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22469>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list