| Home » Categories » Multiple Categories |
How can I create secure download links with Amazon S3 in Linklok |
|
Article Number: 36 | Last Updated: Mon, Jan 28, 2013 at 8:40 AM
|
Amazon S3 is great place to store your downloads for use with Linklok. It can handle up to 5GB files with fast downloads without using bandwidth, storage or other resources on your server. Amazon provides an easy to use web based console for managing your S3 account so here is a quick getting started guide.
Setting up an S3 account
1) Signup for an S3 account at http://aws.amazon.com/s3/. Make a note of the Access Key ID and Secret Access Key that they assign you as these are used in Linklok to create the download path.
2) Once you are signed up you can login to the console at https://console.aws.amazon.com/s3/home
3) When logged in you will see the main screen as follows.
4) Create a bucket by clicking the Create Bucket button. The bucket name must be unique on S3 and should be lowercase characters only. In this example I have named the bucket vibralogixtest. You can select which S3 server to store the file on. Any will work fine.
5) Once your bucket is created double click it in the Bucket List to open it ready to upload a file.
6) Click Upload in the Objects and Folders section of the screen and select the file to upload.
7) Once uploaded we need to check that the correct content type is being used. Right click the file and select Properties and then click the Metadata tag. You will see the default content type assigned by S3 to the file. This is usually fine for viewing the file (such as a .jpg or .pdf) in the browser if this is what you need. However often you will usually want the user to download the file instead in which case perform steps 8) to 10) below.
8) To force a file to be downloaded rather than displayed in the browser (usually what is required with Linklok) we need to change the default Content-Type to be
application/force-download
by entering that in the value field.
9) Now we will add a new header which is also required by some browsers to force a download. Click Add more metadata and enter the following
Key: Content-Disposition Value: attachment;filename="filename.zip"
replacing the filename in the quotes with your filename.
The settings should look something like this when you are finished
10) Finally click Save to assigned the new file headers.
File Privacy Linklok accesses files from S3 using special signed links which can't be shared. Normally you should keep your files and buckets private to stop anyone accessing them without Linklok using a standard S3 link. This is the default permission setting in the S3 Console anyway. You can set a buckets or files to have public access as well if you wish but we don't recommend this for obvious reasons. Please note that the S3 link displayed for a file in the console will fail unless you set public access but Linklok links will still work.
S3 file path The file path used by Linklok is not the link that S3 provides you in the console as this is not secure and won't work with private buckets. Instead we create a one off specially signed link. So instead of the usual download path use a path setup like this
s3|accesskeyid|secretaccesskey|bucketname|filename
Replace the parts in green with your S3 account details and bucket name. For further details about creating the path see the manual.
|
Attachments
There are no attachments for this article.
|
Can I modify the code in Linklok 2CO
Added on Tue, Aug 2, 2011
When I return to my download page I see an INVALID error message
Added on Tue, Aug 2, 2011
Can I use Linklok URL with my credit card processor?
Added on Tue, Aug 2, 2011
Can I modify the code in Linklok Paypal
Added on Tue, Aug 2, 2011
Why does Linklok Mals show ’Some items in your order are not downloadable so will be processed manually’ mean
Added on Tue, Aug 2, 2011
Is there a discount if I buy extra licenses for Linklok URL?
Added on Mon, Aug 1, 2011
Is there a discount if I buy extra licenses for Linklok Mals?
Added on Mon, Aug 1, 2011
How do I use Linklok URL with CMS systems?
Added on Tue, Aug 2, 2011
Can I use Linklok Paypal with Wordpress or other CMS systems?
Added on Tue, Aug 2, 2011
Is there a discount if I buy extra licenses for Linklok Clickbank?
Added on Mon, Aug 1, 2011
|



