GithubHelp home page GithubHelp logo

autoleaguex / s3securedownloads Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnwbaxter/s3securedownloads

0.0 2.0 0.0 52 KB

A Craft CMS plugin that returns a signed URL for assets stored in Amazon S3.

License: MIT License

PHP 85.14% CSS 2.26% JavaScript 2.25% HTML 10.35%

s3securedownloads's Introduction

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

Alt text

Installation

To install S3 Secure Downloads, follow these steps:

  1. Download & unzip the file and place the s3securedownloads directory into your craft/plugins directory
  2. -OR- do a git clone [email protected]:jonathanmelville/s3securedownloads.git directly into your craft/plugins folder. You can then update it with git pull
  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.

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>

S3 Secure Downloads Changelog

1.0.0 -- 2016.02.25

  • Initial release

Brought to you by Jonathan Melville

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.