Skip to content

WHITE-developer/craft-s3securedownloads

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Secure Downloads plugin for Craft CMS

This plugin will return a signed URL 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).

From the original developer, Jonathan Melville:

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. … Now you can keep your S3 objects private but grant temporary access to them with an expiring link.

Screenshot of the plugin settings.

S3 Secure Downloads is built for Craft v3.x. For a version that runs on Craft v2.5.x, see the original plugin.

Installation

# Require the plugin with composer
composer require kennethormandy/craft-s3securedownloads

# Install the plugin via the Control Panel, or by running:
./craft install/plugin s3securedownloads

Usage

Pass in an asset's entry id and it will return a signed URL for that asset:

<a href="{{ getSignedUrl(entry.myAssetField[0].id) }}">{{ entry.myAssetField[0].title }}</a>

License

The MIT License (MIT)

Copyright © 2016–2019 Jonathan Melville
Copyright © 2019 Kenneth Ormandy Inc.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 88.3%
  • HTML 11.7%