Skip to content

Commit

Permalink
v2.0.0 for Craft CMS 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethormandy committed Dec 3, 2019
1 parent c50cd43 commit b5c1678
Show file tree
Hide file tree
Showing 21 changed files with 4,430 additions and 488 deletions.
8 changes: 5 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
The MIT License (MIT)
Copyright (c) 2016 Jonathan Melville

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright © 2016–2019 [Jonathan Melville](https://github.com/jonathanmelville/s3securedownloads)
Copyright © 2019 [Kenneth Ormandy Inc.](https://kennethormandy.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# S3 Secure Downloads plugin for Craft CMS

**NOTE** This plugin is being converted for Craft CMS3, and the README is being revised accordingly.

This plugin will return a [signed URL](http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) used to allow temporary access to private objects with an expiring URL. You can optionally allow file downloads only for logged in users and force file downloads (useful for PDF files). This plugin was originally developed for a client in the financial services industry who wanted to make sure only logged in users had access to downloads of financial reports, and download links couldn't be shared.

Craft introduced the ability to have private S3 assets in [2.6.2771](https://craftcms.com/changelog#build2771). Now you can keep your S3 objects private but grant temporary access to them with an expiring link.
Expand All @@ -15,7 +17,7 @@ To install S3 Secure Downloads, follow these steps:
3. Install plugin in the Craft Control Panel under Settings > Plugins
4. The plugin folder should be named `s3securedownloads` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.

S3 Secure Downloads works on Craft 2.5.x.
~~S3 Secure Downloads works on Craft 2.5.x.~~

## Usage

Expand All @@ -29,4 +31,11 @@ Pass in an asset's entry id and it will return a signed URL for that asset:

* Initial release

Brought to you by [Jonathan Melville](http://jonathanmelville.com)
Brought to you by [Jonathan Melville](http://jonathanmelville.com)

## License

[The MIT License (MIT)](./LICENSE.txt)

Copyright © 2016–2019 [Jonathan Melville](https://github.com/jonathanmelville/s3securedownloads)
Copyright © 2019 [Kenneth Ormandy Inc.](https://kennethormandy.com)
216 changes: 0 additions & 216 deletions S3SecureDownloadsPlugin.php

This file was deleted.

39 changes: 39 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "kennethormandy/craft-s3securedownloads",
"description": "Return an AWS signed URL and proxy the download request.",
"version": "2.0.0",
"type": "craft-plugin",
"keywords": [
"craft",
"aws",
],
"authors": [
{
"name": "Kenneth Ormandy",
"homepage": "https://kennethormandy.com"
},
{
"name": "Jonathan Melville"
}
],
"support": {
"email": "[email protected]",
"issues": "https://github.com/kennethormandy/craft-s3securedownloads/issues?state=open",
"source": "https://github.com/kennethormandy/craft-s3securedownloads",
"docs": "https://github.com/kennethormandy/craft-s3securedownloads/blob/master/README.md"
},
"require": {
"craftcms/cms": "^3.1.0"
},
"autoload": {
"psr-4": {
"kennethormandy\\s3securedownloads\\": "src/"
}
},
"extra": {
"handle": "s3securedownloads",
"name": "S3 Secure Downloads",
"class": "kennethormandy\\s3securedownloads\\S3SecureDownloads",
"documentationUrl": "https://github.com/kennethormandy/craft-s3securedownloads/blob/master/README.md"
}
}
Loading

0 comments on commit b5c1678

Please sign in to comment.