Changes between Version 3 and Version 4 of Ticket #23483, comment 12
- Timestamp:
- 07/08/2017 12:41:31 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23483, comment 12
v3 v4 3 3 The site subdirectory in multisite is present in the attachment url when a custom UPLOADS directory is specified. The upload succeeds, but the attachment url is incorrect and hence attachments fail to load. 4 4 5 Is a RewriteRule the only hope?6 7 Nate8 9 5 --- 10 6 11 7 '''Update''' 12 After trying a host of other functions and filters to remedy the problem, what worked for me was simply this in functions.php:8 After trying a host of other functions and filters to remedy the problem, what worked for me was making no UPLOADS declaration in wp-config.php and simply this in functions.php: 13 9 14 10 {{{#!php 15 update_option('upload_url_path', $_SERVER['HTTP_HOST'].'/media'); 11 update_option( 'upload_path', ABSPATH.'/media' ); 12 update_option( 'upload_url_path', network_home_url('/media') ); 16 13 }}} 17 14