The Amazon S3 Integration addon for Simple Download Monitor lets you securely store and deliver digital downloads using Amazon’s Simple Storage Service (S3).
You can serve the private or protected files from your amazon S3 account using this addon and monitor the download stats.
This addon uses the Amazon AWS SDK which requires at least PHP5.5 and OpenSSL PHP extension. These should be present on almost all modern servers by default. However, you should ask your hosting provider just to make sure your server meets this minimum requirement.
Get the Amazon S3 Integration Addon
Installing the S3 Integration Addon
You can install this addon the same way you install any WordPress plugin:
- Go to the Add New plugins screen in your WordPress admin area
- Click the upload tab
- Browse for the addon file (sdm-amazon-s3.zip)
- Click Install Now and then activate the plugin
Addon Usage Instructions
Step 1) Enter Your Amazon S3 API Details in the Addon Settings
Go to the Amazon S3 link from the main menu of the Simple Download Monitor plugin.
Enter your AWS Key and AWS Secret Key then save the settings. You can get your API keys from your Amazon AWS account.
Step 2) Enter the File/Object Link in SDM Download
Copy the file’s link from your Amazon S3 account and enter it in download monitor plugin’s download item.
You can get the file’s link by going to properties of that file in your S3 management console.
Copy the URL of the file/object then enter it in the download configuration of the Download Monitor plugin.
Save the download item.
Testing the Download
After you have configured the download, you should be able to put this download on a page and test it.
What File Permission To Use in Amazon S3
When you upload a file to your amazon S3 account to use with the Download Monitor plugin, you should make it private (not public). By default, the file will be private when you upload.
This addon will use the API to dynamically retrieve the file and then serve it to the visitor when they click the download button.
Force a File to Download Instead of Opening in the Browser
Usually when a visitor goes to a file URL (for example: a download link), the file will show in the browser if the browser can read it. Image files like jpg, png, gif etc. will almost always show in the browser. Archive files like zip, tar, gzip etc. will always be downloaded. Some file types show up in some browsers but not others depending on if the browser can read the file or not. Usually this is not an issue as the users can save the file to their computer after it is shown in the browser.
If you want to force the file to pop the download dialogue box (instead of opening in the browser), then set the correct Metadata on your files in Amazon S3.
Set the following Metadata to your S3 files that you wan to force download. You will need to replace “FILENAME.EXT” with the actual file name.
Content-Disposition: attachment; filename=<FILENAME.EXT> Content-Type: application/octet-stream
You can set Metadata when you are uploading the file to your Amazon S3 account.