Craft CMS Plugin for Downloading of secret Files
PHP Shell
Switch branches/tags
Latest commit 07419ba Jan 21, 2018
Permalink
Failed to load latest commit information.
.github updated config Jan 18, 2018
resources/img Update icon.svg Jan 20, 2018
src Update icon.svg Jan 20, 2018
.craftplugin Inital Commit Jan 18, 2018
.gitignore Inital Commit Jan 18, 2018
CHANGELOG.md Inital Commit Jan 18, 2018
CONTRIBUTE.md updated config Jan 18, 2018
LICENSE.md Inital Commit Jan 18, 2018
README.md Update README.md Jan 20, 2018
code_standard.xml updated config Jan 18, 2018
composer.json Update composer.json Jan 20, 2018
csniff.sh updated config Jan 18, 2018

README.md

ServeSecret plugin for Craft CMS 3.x


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!

<a href="{{ secretFile(entry.files.first()) }}">entry.files.first().title</a>

{% for files in entry.files %}
       <a href="{{ secretFile(file) }}">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