Bug: incorrect upload img url
-
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 https://image.domain.com/uploadsAll 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’]));
- The topic ‘Bug: incorrect upload img url’ is closed to new replies.