All Projects → nfourtythree → SecureAssetDownload

nfourtythree / SecureAssetDownload

Licence: other
Craft CMS plugin for secure asset download URLs

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to SecureAssetDownload

Craft-Twig-ImageBase64
A simple Twig extension for Craft CMS to create base64-encoded images from Assets in your Twig templates.
Stars: ✭ 14 (-36.36%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
tablemaker
A user-definable table field type for Craft CMS
Stars: ✭ 39 (+77.27%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
disclosedassets
DEPRECATED Allow your clients to find asset sub-folders by disclosing them by default
Stars: ✭ 13 (-40.91%)
Mutual labels:  assets, craftcms, craft-plugin
craft-entry-instructions
A simple fieldtype to add instructions.
Stars: ✭ 16 (-27.27%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
craft-json-snippets
Helps make CraftCMS models in .json
Stars: ✭ 17 (-22.73%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
craft-entriessubset
Craft field type plugin that extends the core Entries field type to give extra settings
Stars: ✭ 27 (+22.73%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
overflow.craft-plugin
A plain text Craft field type, with a soft or hard character limit.
Stars: ✭ 13 (-40.91%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
Stamp-Craft
Plugin for adding timestamp to filenames.
Stars: ✭ 28 (+27.27%)
Mutual labels:  assets, craftcms, craftcms-plugin
craft-recaptcha
Integrate Google’s reCAPTCHA into your web forms.
Stars: ✭ 16 (-27.27%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
craft-donkeytail
A Craft CMS fieldtype for content managing points on images.
Stars: ✭ 53 (+140.91%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
smartdown.craft-plugin
Bringing the unbridled joy of Markdown Extra and Smartypants to your Craft websites.
Stars: ✭ 26 (+18.18%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
craft-audit
Audit log for Craft 3
Stars: ✭ 18 (-18.18%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
Craft-User-Manual
📚 Help Section Plugin for Craft CMS.
Stars: ✭ 86 (+290.91%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
craft-react
Client and Server-side React rendering for CraftCMS
Stars: ✭ 40 (+81.82%)
Mutual labels:  craftcms, craft-plugin, craftcms-plugin
craft-typogrify
Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
Stars: ✭ 70 (+218.18%)
Mutual labels:  craftcms, craft-plugin
craft-assetmetadata
Asset Metadata plugin for Craft CMS
Stars: ✭ 31 (+40.91%)
Mutual labels:  craftcms, craft-plugin
like
Let your users like your Craft website's entries, assets and any other element.
Stars: ✭ 44 (+100%)
Mutual labels:  craftcms, craft-plugin
DigitalProducts
Sell digital products with Craft Commerce
Stars: ✭ 48 (+118.18%)
Mutual labels:  craftcms, craft-plugin
oembed
A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
Stars: ✭ 34 (+54.55%)
Mutual labels:  craftcms, craft-plugin
craft-youtubeliveembed
This plugin allows you to embed a YouTube live stream and/or live chat on your webpage
Stars: ✭ 14 (-36.36%)
Mutual labels:  craftcms, craft-plugin

Secure Asset Download

Secure Asset Download is a simple Craft CMS plugin allowing you, from your templates, to generate download URLs for specified assets that are only available to certain users/groups

Installing

  1. Copy the secureassetdownload directory into your craft/plugins directory
  2. Navigate to Settings > Plugins in the Craft CP
  3. Click on the Install button next to Secure Asset Download
  4. Set secret key in plugin settings by clicking Secure Asset Download
  5. Use {{ craft.secureAssetDownload.getUrl(options) }} to generate secure URL (see usage below)

Settings

Encryption Key: Secret key used when encrypting the URLs

Options

asset is the only required option. If no other options are set any logged in user will be able to access generated URLs. Admins have access to all generated URLs regardless of options

{
  asset: id or AssetFileModel, // e.g 14 or craft.asset.id(23).first()
  userId: id or array of user ids, // e.g. 6 or [ 17, 28, 30 ]
  userGroupId: id or array of user group ids, // e.g. 3 or [ 1, 99, 76 ]
  forceDownload: true or false, // Optional field to force the download rather than opening in the tab (default: true)
}

note: Options are AND logic

Usage

Secure for all logged in users

{% set options = {
  asset: 17
} %}

Secure for any user in specifc group

{% set options = {
  asset: 17,
  userGroupId: 2
} %}

Secure for any user any specified group

{% set options = {
  asset: 17,
  userGroupId: [ 2, 6 ]
} %}

Secure for specific users

{% set options = {
  asset: 17,
  userId: [ 46, 86 ]
} %}

Secure for all users, don't force download

{% set options = {
  asset: 17,
  forceDownload: false
} %}

Followed by

{% set url = craft.secureAssetDownload.getUrl(options) %}

<a href="{{ url }}">Download me</a><br><br>

Changelog

See Releases

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].