TUS plugin seems to ignore end point with https (sends to http instead)

Hey guys;

I’m trying to hook up TUS…

The good part: I have pushed the TUS Go application to heroku and its sitting their waiting for work to do.

The confusing part: when I click to upload a file with Uppy, it sends out a request to an http address instead of the https address I have it configured with.

uppy.use(Tus, { endpoint: `https://my-end-point/files/`, resume: true, autoRetry: true, retryDelays: [0, 1000, 3000, 5000] })

But the XHR goes out as http://my-end-point/files/dsaisuyduiasdyusiad and I therefore CORS stops it.

I am putting together a reverse proxy on heroku to allow the https calls to be passed on to the TUS server but I am confused why the request doesn’t go out with the https protocol specified.

Any pointers savoured and appreciated.

Cheers :slight_smile:

Stepping through the code it looks like following function in tus-js-client/lib.es5/browser/request.js is converting the https url into an http one.

function resolveUrl(origin, link) {
return new _urlParse2.default(link, origin).toString();
}

Hi there,

this question appears regularly and is usually caused by a missing configuration for the tus server and proxy. If you are using tusd, can you check whether you set it up properly as explained in https://github.com/tus/tusd/#can-i-run-tusd-behind-a-reverse-proxy?

Kind regards,
Marius

Thanks @marius that helped, not sure how I missed that…

By default the tusd server writes to the server file store. Where would I find those? I don’t see them.

Also, should I be using tus in conjunction with the @uppy/aws-s3 plugin? I am currently using the @uppy/aws-s3 plugin and it’s working great…just trying to see how tus plays its part.

If I have an application that allows user to upload files using uppy, say the user starts to upload huge file…they start uploading but then refresh the page. What would I need to do to get the file uploading again? Just trying to understand how the different parts of your awesome offering work together.

By default, files are stored in the ./data directory, which is controlled by the -dir option. This is also mentioned in the console output of tusd.

I don’t believe you need tus and the S3 plugin but that question is better answered by the Uppy people directly :slight_smile:

Ryan, I am having the exact same problem, I think that I have followed the guidance referenced above by Marius, but it’s not working for me yet. Could you please share exactly what you needed to do to solve the problem?
Thanks, Jeff

1 Like