Feature added: Track public files download counts

Created on 30 March 2020, about 4 years ago
Updated 24 April 2023, about 1 year ago

Problem/Motivation

Download Count only tracks private files.

Proposed resolution

Features has been added to support tracking of public files using an ajax call when a public file is clicked for download.

API changes

  • DownloadCountService has been added to consolidate code used in multiple code spots.
  • Some code has been changed to use adhere the Drupal Coding Standard.
✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland martinpe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany AgathaCrystal Potsdam

    I tested patch #17 and /admin/reports/download-count results in an error with my postgres db:

    The website encountered an unexpected error. Please try again later.
    TypeError: Drupal\download_count\DownloadCountService::__construct(): Argument #7 ($database) must be of type Drupal\mysql\Driver\Database\mysql\Connection, Drupal\pgsql\Driver\Database\pgsql\Connection given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\download_count\DownloadCountService->__construct() (line 80 of modules/contrib/download_count/src/DownloadCountService.php).

Production build 0.69.0 2024