uppy: Mixed Content error while uploading a file to https endpoint

I am getting the following error in Chrome console when I try to upload a file through Uppy.

Mixed Content: The page at '<HTTPS URL>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<HTTP URL>'. This request has been blocked; the content must be served over HTTPS.

Also, noticed the following error:

[Uppy] [15:46:19] Failed to upload filename.xlsx tus: failed to resume upload, caused by [object ProgressEvent], originated from request (response code: 0, response text: )

I have used console.log to print the endpoint and made sure its valid and points to https endpoint, hence this mixed content error doesn’t make sense.

Also, looked inside localstorage and found a key with http:// endpoint. I am not sure where its coming from.

FYI: The server is behind AWS LB (for SSL termination etc).

The exact same setup works fine on localhost.

This is a common issue and may be similar to https://github.com/transloadit/uppy/issues/510 but 510 has no solution (everyone seems to forget how they resolved it 😃).

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Thanks for reporting @naknomum and all. I’ll close this for now, as it is not strictly Uppy, unless you think it is? Please feel free to comment further for future reference if you solve this for Flask-Tus.

@Acconut I did an npm install and ran the same code which works now.

I think the problem was in

 <script type="text/javascript" src="https://transloadit.edgly.net/releases/uppy/v1.10.1/uppy.js"></script>

Solution for me: Of course right after I posted this information, I cleared out the local storage from Chrome and it’s now working properly using an https endpoint on AWS. I’ll leave the above information in case it helps anyone else.