Jump to content

Downloading files from the WebUI?


ctide

Recommended Posts

I'd be handy if there was a way to download completed files directly from the Web UI. I can't imagine it'd be very tough to add in there, and it would simplify the process of getting files off my machine at home to my laptop at work.

Link to comment
Share on other sites

Yeah, be able to snag the files that you've downloaded remotely from the web UI.

For example, we just run a torrent server on the network at home, so if I download something at work I just load up the web UI and queue it up. It'd be nice if I could just hit the web UI from work and download things that have finished.

Link to comment
Share on other sites

It seems that all I need to do is write some javascript that will move files into a folder under webui, and then I can download them from there so I'm just going to hack that in.

edit: Err, I guess I'd have to stuff the files into the zip wouldn't I?

Link to comment
Share on other sites

Here is what made, its a html file that should go on a web server on the machine utorrent is on. you could use iis or wamp as the server. just change according to you utorrent port and password for webui, these are surrounded by ***. on your web server, make a folder called downloads in the same directory as this html file, tell utorrent to put downloads in this directory. i used firefox to make this, so it will look best that way.

<html>
<head>
<title>µTorrent Web UI</title>
<style>
body{
margin:0;
padding:0;
}
#u{
width:100%;
height:90%;
padding:0;
margin:0;
}
#nav{
width:100%;
height:28px;
background:#cccccc;
padding:0;
margin:0;
}
#nav li{
float:left;
list-style:none;
padding:1px;
padding-left:2px;
padding-right:2px;
margin:0;
margin-right: 5px;
margin-left: 5px;
color:white;
border:white 2px solid;
-moz-border-radius:5px;
}
#nav li:hover{
position:relative;
cursor:pointer;
top:-1px;
left:-1px;
float:left;
list-style:none;
padding:1px;
padding-left:2px;
padding-right:2px;
margin:0;
margin-right: 3px;
margin-left: 5px;
color:white;
border:white 3px solid;
-moz-border-radius:5px;
}
#nav ul{
padding:0;
margin:0;
}
#nav li a{
color:white;
padding:0;
margin:0;
}
</style>
<script type="text/javascript">
function changetouv() {
document.getElementById('u').src = 'http://***WEBUI Username here***:***password goes here***@localhost:***port here***/gui/index.html';
}
function changetodl() {
document.getElementById('u').src = 'downloads/';
}
</script>
</head>
<body>
<div id="nav">
<ul>
<li id="uv" onclick="changetouv()">µTorrent Web UI</li>
<li id="dl" onclick="changetodl()">Download</li>
</ul>
</div>
<iframe frameborder="0" id="u" scrolling="no" src="http://***WEBUI Username here***:***password goes here***@localhost:***port here***/gui/index.html"></iframe>
</body>
</html>

Another approach would be to create an alias to your utorrent download directory. If you use wamp server, you can simply click the task bar icon -> Apache -> alias directories -> add an alias. type downloads, then type you utorrent downloads path. this will make a directory on your site, localhost/downloads. then change ths line:

document.getElementById('u').src = 'downloads/';

to this:

document.getElementById('u').src = 'localhost/downloads/';

you would want to do this if you don't want to move you download location.

a note on the web UI devs: just create an alias with Apache as described. add a context menu item the links to the file in the alias directory. Example:

<a href="http://localhost/downoadalias/dynamic filename">Download</a>

Please comment!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...