Saving files directly to Dropbox from Linklok

This article is for Linklok Paypal, Mals, 2CO and AsecureCart. For other versions of Linklok please check the relevant knowledge base category.

You can allow users to download files directly to their Dropbox. This can be quite useful especially for mobile users. You can read more about Dropbox Saver buttons at   https://www.dropbox.com/developers/dropins/saver

First of all you need to create a simple App in your Drop box account as follows.

1) Login to the Dropbox developer area at   https://www.dropbox.com/developers

2) Click  App Console in the left hand menu.

3) Click the  Create App button.

4) Check the  Drop-ins app option

5) Enter a name for the app. Anything is ok but it needs to be unique. For example Dropbox Save for mysite.com

6) Add your domain name to the app (mysite.com). The Save to Dropbox works only from the domain(s) you add.

7) Finally make a note of the App API key which you will need later.

Now that you have your Dropbox App created we can easily convert download links to be Save to Dropbox buttons.

1) On your download page template add this line to the HEAD section replacing API KEY with your API key

<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="API KEY"></script>

2) To convert a download link to use Dropbox we just add data-filename="filename.zip" to the <a> tag of the link replacing filename.zip with the appropriate filename.

For example if you have

<a href="!!!link!!!">!!!filename!!!</a>

you can change it to use Dropbox like this

<a href="!!!link!!!" class="dropbox-saver" data-filename="!!!filename!!!">!!!filename!!!</a>

This link will now appear as a Dropbox save button on the page allowing the user to save directly to their Dropbox account. This works with files stored directly on your server and also those stored on Amazon S3.