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 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.
Step 1 – Get the Direct Download Link
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.
Note- this is for Google Chrome browser
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 or the text editor of your choice.
NOTE you will want to work fairly fast, as these download links will expire within a few minutes!
Step 3 – Open your Terminal and issue a wget command
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.
Leave a comment if this worked for you!
Make us happy about posting, then editing, then improving this tutorial by saying how darned useful it was to you. Just because it will maybe give us warm and fuzzy feelings on a dull and dreary morning one day.