Manual:$wgForeignUploadTargets

Array of foreign file repository names (set in $wgForeignFileRepos) that are allowable upload targets for the upload dialog. The "target" wikis corresponding to the repositories must share the list of users with the "source" and be configured to accept CORS requests from the source wiki with $wgCrossSiteAJAXdomains.

In order for uploads to be completed successfully using the same user on the target and source wiki, the wikis must have some method of authentication compatible with mw.ForeignApi (i.e. CentralAuth).