[wp-trac] [WordPress Trac] #49658: Incorrect Upload Directory path using wp_upload_dir()

WordPress Trac noreply at wordpress.org
Tue Mar 17 13:56:54 UTC 2020


#49658: Incorrect Upload Directory path using wp_upload_dir()
----------------------------+------------------------------
 Reporter:  amitkumarsingh  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:  5.3.2
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:
----------------------------+------------------------------

Comment (by amitkumarsingh):

 Thanks for the reply.
 While I see what you say about the forward and backward slashes to be true
 when accessing through file explorer, I still get a 500 Internal Server
 error when using the PATH retrieved by wp_upload_dir() function.
 Whereas there are no issues when I use wp_upload_dir() on Linux.
 Trac #44654 does make a good point that DIRECTORY_SEPARATOR should be
 used.
 But, the point here to note is the path is being returned by the function
 and not by plugin code.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49658#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list