We were on the hunt for a plugin that allowed easy insertion of expiring Amazon S3 links into a post or page. After a search through the WordPress plugin repository, we found a few, but some were overly complex and/or outdated.
I wrote a simple plugin, called PluginBuddy S3 URLs, that allows you to easily insert Amazon S3 expiring links into a post or page via a shortcode button. Currently the plugin requires both PHP 5 (or higher) and WordPress 3.0 (or higher).
For those not familiar with Amazon S3, it is a Content Distribution Network (CDN) that allows you to host files. These files can be made public or private. Most of the time you’ll want to leave these files private, and with the proper authentication, a user can access the content.
For private files, you can set up the proper authentication as well as an expiration time for the link (say, 2 hours). If someone copies the link and shares it with a friend, that link will only be good for the 2 hours.
A use-case I recently came across was for a preview of my book, WordPress and Ajax. Several people were linking directly to the PDF, or scraping the contents. I moved the preview PDF to Amazon S3 and set up expiring links so that even if the link was scraped, the preview would only work in the long-term from my preview page. Essentially, each time someone visits my preview page, the expiration is updated. As long as the user downloads the preview from my page, the link will always work.
Here are a few screenshots of the plugin:
The plugin is freely available at the official WordPress plugin repository.
Be sure to follow PluginBuddy on Twitter to stay up on all the latest news.