Use pathname in torrent upload

This commit is contained in:
Luminarys 2017-10-22 21:16:30 -07:00
parent 98accb302a
commit b7b48916cd

View File

@ -53,7 +53,7 @@ class AddTorrent extends Component {
console.log(socket); console.log(socket);
const a = document.createElement('a'); const a = document.createElement('a');
a.href = socket.uri; a.href = socket.uri;
const url = (a.protocol === "ws:" ? "http://" : "https://") + a.host; const url = (a.protocol === "ws:" ? "http://" : "https://") + a.host + a.pathname;
try { try {
const resp = await fetch(url, const resp = await fetch(url,
{ {