Allow download of private assets by logged in users

v2.0.0-beta 2021-09-20 23:41 UTC

This package is auto-updated.

Last update: 2024-05-21 05:29:19 UTC


MIT Licensed

This package provides a way to allow logged in users to download private assets.


  • PHP 8.0+
  • Statamic v3.2+


You can install this package via composer using:

composer require edalzell/download

The package will automatically register itself.

NOTE: assets must be private (otherwise they are publicly accessible and can always be downloaded)


The {{ download }} tag produces a url that will only allow the file to be downloaded if the user is logged in.

If someone not logged in tries the link, there will be an error returned in the errors session key.


  • file (required) - name of the file
  • container (required) - container the file is in.