Standalone Uppy companion and Uppy dashboard - nginx proxy pass

Hi,
I’ve been trying to set up Uppy for two days now and I need help. I’ve used the demo on uppy.io and it’s a slick product, but so far I haven’t been able to make it work.

I’m building a web application with go on the backend and a little bit of js in the frontend.

To avoid CORS requests I want to have the companion under the same domain as my application.

location / {
    ...
    # proxy to web 
    proxy_pass http://127.0.0.1:8100;
}

location /uppy/ {
	...
    # proxy to standalone uppy companion
	proxy_pass http://127.0.0.1:8200;
}

I now have Uppy companion running on https://mydomain.com/uppy/companion/, and I can see that it works by going to, for instance, https://mydomain.com/uppy/companion/metrics.

Now comes the pain.

In the frontend as a companion url I set https://mydomain.com/uppy/companion/ because /uppy/companion/ is for whatever reason transformed into https:///uppy/companion/.

And I get all sorts of errors:

When clicking on any cloud provider (I’m using the Dropbox, Google Drive and Onedrive plugins) to connect

Error: Could not get https://mydomain.com/uppy/companion/drive/list/root.
Error: Failed request with status: 404. Not Found
message: Not Found

Can anyone point me in the right direction? I’m open to change my setup, I just want to get this working with a standalone server.

Thanks,
Tommaso

Hi there, if your Companion is running at https://mydomain.com/uppy/companion/ then you need to set the server.path option to /uppy/companion

so something like:

{
    server: {
          path: '/uppy/companion'
    }
}

Hi, thanks for taking the time to reply.

I’ve made some progress since posting here in part thanks to your suggestion. I’m now at the point where
I can see the OAuth screen for the different providers,

I can accept the request of permissions, then I’m redirected to the page with the uppy dashboard. So far so good.

The issue is then that I get a 401 when the dashboard makes a call https://mydomain.com/uppy/companion/drive/list/root

I think I’ll revisit the companion when 2.0.0 is out of beta. I’ll stick with tus for now.