We just added new functionality to the URL redirects tool which allows you to leverage proxy redirects to host files on the root directory of your HubSpot-hosted site. (Although the announcement was on March 15, I was notified of factors that hampered your use case, so I held off on posting here until I got three green light today.)
Proxy: select this type to redirect the content of your live page without changing the URL displayed on the visitor's web browser. This redirect type is often used to share a file that's hosted on a specific directory outside your main site.
If I understand the request from your original post correctly:
Any marketers here who have issues of not being able to upload files on root directory?
This is now possible by via URL Redirect using Proxy redirect style. Like in the case of uploading the service worker script from subscriber.com, you can just upload firebase-messaging-sw.js anywhere in your File Manager then add a url redirect in Settings > Domains & URLs > URL Redirect:
Dec 1, 202010:27 AM - edited Dec 1, 202010:29 AM
HubSpot Employee
COS file upload to root - push notification
SOLVE
If anyone is facing the error message saying "original URL is not hosted on Hubspot" while implementing the above - you can omit your domain "www.example.com" from the input and that should do the trick!