[wp-testers] upload_url_path is always overwritten in function wp_upload_dir

Jim McQuillan jim at jimmcq.com
Wed May 12 16:52:11 UTC 2010


I was checking up on my original submission below, and I see that it has
been cross-referenced with bug #12549 which is marked as a blocker for 3.0.

So, I wanted to see if #12549 (Incorrect file URL for existing uploaded
images) is going to be fixed before the 3.0 release.

http://core.trac.wordpress.org/ticket/12549

Thanks!
-Jim


On Mon, Apr 5, 2010 at 1:30 PM, Jim McQuillan <jim at jimmcq.com> wrote:

>
> I need to have a custom upload_path and upload_url_path so that uploads are
> served from a separate dedicated server. The problem is that the file URL is
> always being overwritten by a URL that points to a subdirectory under my
> main wordpress install.
>
> I tracked down the problem to the following code within the wp_upload_dir
> function of wp-includes/functions.php:
>
> if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
>     $dir = ABSPATH . UPLOADS;
>     $url = trailingslashit( $siteurl ) . UPLOADS;
>
> }
>
> Because I have an $upload_path defined this conditional is always trigged
> and the $url is overwitten when I want it to keep it as get_option(
> 'upload_url_path' ) as it was set to before this bit of code.
>
>
> I filed this as a bug# 12639 http://core.trac.wordpress.org/ticket/12639
>
>


More information about the wp-testers mailing list