Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 210725

Bug: incorrect upload img url

$
0
0

Replies: 0

Hi,

I changed default options in /wp-admin/options.php

upload_path to subdomain /srv/www/image.domain.com/htdocs/uploads
upload_url_path to subdomain http://image.domain.com/uploads

All my images upload to this path.

Then I try get_recent_posts but option posts.thumbnail return null because json-api/models/attachment.php function query_images() on line 44 and 47 return path to blog name.

To fix this I changed $filename to:

$dir = wp_get_upload_dir();
$filename = $dir[‘basedir’] . substr($url, strlen($dir[‘baseurl’]));


Viewing all articles
Browse latest Browse all 210725

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>