This tutorial explains how to use wget and WeTransfer, to direct files straight at your server or VPS.
If you are working with watery broadband, then sometimes you might run into a situation where someone sends you a massive bunch of files, and these will take you all day to download.
It is useful for to be able to download large or huge multiples of files in a few seconds to our server (which is in Gloucester, UK, and has a big thick 100MBPS datapipe feeding it), so that we can extract the files and grab the individual bits we need, or send them to our colleagues.
The description below will allow you to download a WeTransfer zip file direct to your server, using a terminal window, such as PuTTy, or whatever your command line tool of choice may be.
How to Download WeTransfer Files to your Server
So, you’ve been sent a WeTransfer link from a colleague or supplier with all the files you need. Click this link to visit WeTransfer.
You need the direct download link, which also has a few bits and bobs in it to tell AWS (WeTransfer uses AWS) which file you need to download and that you are allowed to do so.
These instructions presuppose you are using the Chrome browser. Other browsers are available, but may require different process.
To get the direct download link, click on the WeTransfer download button, to kick off the file downloading. Don’t worry, you don’t need to wait 4 days, or whatever it says, we just need to get WeTransfer to generate the necessary tokens.
Then press Ctrl J to visit your downloads screen in Chrome.
Here you will see the file that is downloading – the file name, and below that, the whole download link. This is what we need. The link. Right click it and click “copy link address”.
Paste that link into a Notepad.
NOTE you will want to work fairly fast, as these download links will expire within a few minutes!
Next open up your Terminal (PuTTy) and navigate to the place you would like to download these files to. I usually use a new folder below the webroot for this, so I know where I put things!
Then use the following command:
wget --user-agent Mozilla/4.0 '[YOURWETRANSFERLINK]' -O [FILENAMEYOUWANTFORZIP]
This should kick off a download. If your server is as fast as ours, it should grab a Gigabyte of data in about 10-30 seconds. Which is nicer than waiting several days if your broadband speed is slow.