When you need to upload stuff to Free Disk Space, I think you'll notice using their file transfer applet, that the speed the file gets transfered varies a great deal. It varies quite randomly.
To investigate this, I've turned off the multiple file transfer setting, and examined their signle file upload, which is a regular HTML form. It turns out that FDS will use different IP addresses for the upload, and it does seem to change randomly. And also that some IP were very fast while others were terrible.
So to transfer files to them quickly, what was needed was for user to specify which IP will be used. So let's get to the solutions:
Solution 1: Single Uploads
This solution doesn't require any special software, and allows you to upload one files at a time using their HTML form.
- Logon to your FDS account, and turn off multiple file upload. Launch the
- You should have a small window with file upload form. Right click on the
window and do Save As, save it somewhere.
- Open up the saved HTML file with Notepad. You should see the following line
around line 14:
<form NAME="file_upload_form" ENCTYPE="multipart/form-data" action="http://188.8.131.52:80/upload.asp?site_id=1&folder_id=
- Change the
http://184.108.40.206:80 with the IP that works best
for you. You'll need to find out which one works by doing single file upload
a few times and noting the IP address used. For me, the one shown here works
- Once you change the IP, save it. You can now load up the page from your
local hard drive and use it like it was from FDS. When you need to do this
again for another session, simply copy & paste everything after the upload.asp?
(which contains the session ID) from the FDS's upload page to the page on
your hard drive. When an upload gets completed, simply press back and do it again.
Solution 2: Batch Upload
The first solution works great for uploads with small number of files. But
what if you had dozens of files that'll take all night. You wouldn't want to
sit through it and do it one by one. To do that, we'll need something more advanced.
I've created a Perl script that'll take care of this for us. This method is
only recommended for uploading large number of files that are less than 15mb
each. The script is very inefficient and uses up memory if the files are too
large and may crash.
First, what you'll need:
Perl 5 - download from ActiveState.
I have tested on Perl 5.6. This script will not work for old version
of ActiveState Perl. (I have not tested on other builds)
The script - Unrar and place it somewhere
on your hard drive.
Once you've got the software (and rebooted), test the script. Open up a dos
prompt at the directory you have the script, and type:
perl -cw fdsupload.pl
If you downloaded ActiveState's Perl, you should be all right. But if
it shows error about modules not found, you'll need to install missing module.
The script uses LWP module.
To install LWP module type
ppm. Once in the ppm shell, type
LWP. You should now be all set.
We should now configure the script. Open up the fdsupload.pl with notepad,
and change some of the variables at the top. They should be self-explanatory.
Then to start up the upload, either double click the script or type
fdsupload.pl. Sit back and see it batch upload to FDS.
You may notice that the script seems to lock, but it's due to the script trying
to load the entire file into memory. This cannot be avoided with the LWP module.
Only solution is for me to re-write the module to use the Socket directly instead
of using the LWP API, and that involves much more coding on my part. (like doing
MIME encoding and opening/closing connections, etc. LWP takes care of that)