Wordpress upload dir

Hello i made a custom plugin that point the wp-content/upload folder to an external object storage (s3 compatible) to serve images over cdn.mydomain.com

What i noticed is that matomo also install files inside the upload dir of every subdomain (this is a multi-site wordpress).

I need to know if it is ok tu serve also matomo over the cdn or is it a problem? i’ve seen there are also php and .htaccess files there that can’t work over s3.

see the picture:

if it is a problem, there is a system to install those files in a separate dir than uploads folder?

Thank you very much

Nobody can help me with this?