Skip to content
Craft CMS Plugin for Downloading of secret Files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
resources/img
src
.craftplugin
.gitignore
CHANGELOG.md
CONTRIBUTE.md
LICENSE.md
README.md
code_standard.xml
composer.json
composer.lock
csniff.sh

README.md

ServeSecret Craft CMS 3.x plugin

Codacy Badge

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Beerpay Beerpay


Serve files that are not Stored in public accessable Directories. e.g for Password Protected Areas. File links could and should not be shared!

The file links are decoded to hide the path from the user and to make the link only accessable for the current Session, so thats the reason why its not possible to share the links!

Requirements

This plugin requires Craft CMS 3.0.0 or later.

Contribute to the Project

if you want to help with this project, read how to contribute

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require itscoding/serve-secret
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for ServeSecret.

Using ServeSecret

Screenshot

  1. Crate a volume in craft (start with @webroot is recommended but it should work also with absolute paths

  2. Use it in your templates --> put your asset as an method argument!

# the second parameter is optional, if is set to false, the file will download instead of open in the browser,the default value is true
<a href="{{ secretFile(entry.files.first(),false) }}">{{ entry.files.first().title }}</a>

{% for files in entry.files %}
       <a href="{{ secretFile(file,true) }}">{{ file.title }}</a>
{% endfor %}

ServeSecret Roadmap

Some things to do, and ideas for potential features:

  • Implement possibility to share the file-links

Brought to you by Simon Müller

You can’t perform that action at this time.