For multisite, there is shared (can be accessed from all sites) users and usermeta table, options table. So is there any shared upload directory?
if not, is there a way to reliably remove multisite part (eg. sites/2) from upload directory using
upload_dir so that it always return main upload directory?
in _wp_upload_dir it is always NOT the case that it adds sites/2. so we cannot just remove that part.
also i am not sure now
get_site_option( 'ms_files_rewriting' ) is always return false or not (my wp minimum version requirement is 4.4).
so what should be my approach to get upload directory path without additional part for multisite?
EDIT: i can imaging 2 approaches
upload_dirfilter and return _wp_upload_dir without multisite part (write custom function for that)
- save absolute path and url for each file in db (but that will create folders for each sites)
which approaches will be better? i think wp should add a filter so that it can be done easily.