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

Started by ryantomaselli5 replies2,964 views
ryantomaselliOriginal post
#1

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 🙂

ryantomaselli
#2

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();
}

ryantomaselli
#4

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.

#5

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 🙂

jbmulliganReplying to #4
#6

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