[wp-trac] [WordPress Trac] #12044: Wrong path for uploaded files

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 27 21:37:53 UTC 2010


#12044: Wrong path for uploaded files
--------------------------+-------------------------------------------------
 Reporter:  wpmuguru      |       Owner:  ryan       
     Type:  defect (bug)  |      Status:  assigned   
 Priority:  normal        |   Milestone:  3.0        
Component:  Multisite     |     Version:  3.0        
 Severity:  normal        |    Keywords:  needs-patch
--------------------------+-------------------------------------------------
Changes (by freddyware):

 * cc: frederick.ding@… (added)


Comment:

 I can confirm that this has been fixed by [12850] and/or [12851]. The URLs
 are now as they should be (http://rhhsweb.com/files/2010/01/rhhs-web-
 wordpress-button-150x86.png, for example).

 As for `var_dump()`, I don't think there's any point now, but I will show
 you what it looked like before updating to the latest trunk:

 {{{
 $file:
 string(80) "/home/rhhsweb/wp-content/blogs.dir/1/files/2010/01/rhhs-web-
 wordpress-button.png"

 $uploads:
 array(6) {
   ["path"]=>
   string(50) "/home/rhhsweb/wp-content/blogs.dir/1/files/2010/01"
   ["url"]=>
   string(32) "http://rhhsweb.com/files/2010/01"
   ["subdir"]=>
   string(8) "/2010/01"
   ["basedir"]=>
   string(55) "/home/rhhsweb/public_html/wp-content/blogs.dir/1/files/"
   ["baseurl"]=>
   string(24) "http://rhhsweb.com/files"
   ["error"]=>
   bool(false)
 }
 }}}

 I suppose the string for `$file` should be just the filename as opposed to
 the absolute path, since the code appeared to stick `$file` at the end of
 the `$uploads['baseurl']`. But it seems to work for me now.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12044#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list