Linux.com

Feature: Internet & WWW

Easy file uploads with Droopy

By Federico Kereki on August 27, 2008 (4:00:00 PM)

Share    Print    Comments   

Suppose someone wants to send you a large file. They could try to send it via email, but many email servers impose limits on file size. They could try sending it over during an instant messenger or Internet Relay Chat session, but that's slow, as the file actually gets transferred twice: once to the chat server, then to your machine. File transfer services like RapidShare and MegaUpload are fine, but not for confidential information. Of course, you could set up an FTP server on your box, but you don't want to leave that door open all the time. Luckily, there's now an easy solution: droopy.

Released in April and available as open source under the Python license, Droopy lets you quickly set up a Web server that gives clients only one thing to do: upload a file to your directory of choice. The upload is done directly, from PC to PC, and when it's over, you can simply halt droopy, and no more uploads will be allowed. The other person need only open a certain URL and use the Web page to upload as many files as needed. Simplicity itself!

Installation and usage

Installation is easy, as droopy is just a Python script. (Of course, you will need to have Python available, but all distributions either include Python or make it easy to install.) Download the script and place it, for example, in /usr/bin; you will need root rights to do this. Make the droopy file executable (chmod +x droopy) so you can execute it directly. In addition, open port 8000 in your firewall; otherwise, nobody will be able to connect to your machine.

Using droopy is simple, but note that the explanations at the Web site are not up-to-date. If you run droopy -h or droopy --help, you will get the following explanation:

usage: ./droopy [-m message] [-p picture] [-d directory] port example: ./droopy -m "Hi, this is Bob. You can send me a file." -p avatar.png

There are only three parameters. The -m (or --message) parameter allows you to specify the message that should be shown to users who connect to the upload page. You can use HTML commands, but don't go overboard: It's just a file upload! The -p (or --picture) parameter lets you add a picture to your page, and -d (or --directory) lets you specify the download directory. According to the Web site, files are always downloaded to the current directory from which you start droopy, but with this parameter you can change that behavior.

If you have a fixed IP address and a domain of your own, you are done: Tell your friend to connect to http://yourOwnDomain:8000 and follow the instructions. If you don't know your IP address, first open a browser at http://127.0.0.1:8000, and on the page you'll see, click on "Discover the address of this page." Note the result; that's the address your friend will have to open. (Yes, you can also find your address in several other ways, such as by using ifconfig, but this way offers a simple solution for non-tech-savvy users.) Yet another way to specify a download site is by using DynDNS.

Now all your friend has to do is select a file and send it; afterward, a link will appear that allows the person to send more files. If somebody sends the same file over and over again, the files will be renamed in order to avoid them overwriting each other: Sending foo.bar three times would get foo.bar, foo-1.bar and foo-2.bar. After you get all files, use Ctrl-C to halt droopy, and that's it.

A single-purpose tool that is easy to use and install, droopy offers a simple solution to a common problem and thus deserves being on your machine.

Federico Kereki is an Uruguayan systems engineer with more than 20 years' experience developing systems, doing consulting work, and teaching at universities.

Share    Print    Comments   

Comments

on Easy file uploads with Droopy

Note: Comments are owned by the poster. We are not responsible for their content.

Easy file uploads with Droopy

Posted by: Anonymous [ip: 134.253.102.56] on August 27, 2008 05:41 PM
If a windows users sends a file say "test.txt" the file name comes across as c:/mydir/someotherdir/test.txt, is there a way to strip out all that directory info and just have the file name?

Thanks

#

This is about as innovative as a cheese sandwich using new cheese.

Posted by: Anonymous [ip: 10.10.10.100] on August 28, 2008 02:52 AM
Also, there's some misrepresentation.
IRC file transfer is done using the DCC (Direct Client-to-Client protocol) SEND service, which doesn't pass through the relay server except to send the filename and the IP & port of the serving computer (normally wrong if you're behind a NAT router).
While some IM clients do pass files through the server, a fair number also use P2P discovery and transfer protocols to perform the transfer – XMPP (what Google Talk uses) for example prefers out-of-band SOCKS5 transfers as described at http://www.xmpp.org/extensions/xep-0065.html

#

Easy file uploads with Droopy

Posted by: Anonymous [ip: 10.127.97.3] on August 28, 2008 08:49 AM
Thanks, very useful fo me!

Max from Italy

#

Why not BitTorrent?

Posted by: Anonymous [ip: 118.93.92.200] on August 28, 2008 10:23 AM
Create a .torrent file for the file or directoryful of files you want to transfer. Start seeding. E-mail the .torrent file to the recipient (and don't send it to anybody else!). Wait for them to finish downloading the file/files. Stop seeding. Simple.

Lawrence D'Oliveiro

#

Re: Why not BitTorrent?

Posted by: Anonymous [ip: 20.137.30.50] on August 28, 2008 06:42 PM
The point is to be able to receive files, not send them! Why do you want to make somebody who has the file you want go through so much work?

#

Easy file uploads with Droopy

Posted by: Anonymous [ip: 79.166.54.186] on August 29, 2008 02:52 PM
FYI: use woof, another simple tool, to SEND files (also python)

#

Re: Easy file uploads with Droopy

Posted by: Anonymous [ip: 81.153.34.159] on August 31, 2008 12:34 PM
IRC transfers don't go to the IRC server then to the user, that's simply not true. IRC uses DCC aka Direct Client to Client so it's basically what Droopy does. Imagine if it went through IRC servers, the load would be massive.

#

Easy file uploads with Droopy

Posted by: Anonymous [ip: 132.248.12.223] on September 02, 2008 09:30 PM
Thanks a simple and nice solution. :D Bytevic

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya