Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Filename Hash Token

27 sites Security covered Drupal 8–11
View on drupal.org

This module provides tokens that generate a hash from a filename. It also offers a token for a specific substring of that hash, which can be used with path-handling modules to organize uploaded files.

Introduction

The Filename Hash Token module defines tokens for a hash and a substring of a hash, generated from a filename. The substring token is especially useful when used with the File (Field) Paths module to organize files within a site's public files directory.

Dependencies

This module depends on the File module provided by Drupal core. The File (Field) Paths module can be leveraged to define directory paths using a hash substring generated by the name of an uploaded file. The Token module is helpful to provide a UI for browsing tokens.

Configuration

This module requires no configuration.

Examples of use

All examples use the filename "Example_File.txt".

Token: [file:name-hash]
Result: 2923b18d012d783db62a172af46da20f (The full hash of the filename)

Token: [file:name-hash-substring:4]
Result: 2923 (4 characters from the hash, offset by 0 characters)

Token: [file:name-hash-substring:2,3]
Result: 3b (2 characters from the hash, offset by 3 characters)

Maintainer

Current maintainer:

Depends on

Dependencies of the latest stable release

  • file Drupal core >= 8.8.0

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.1 Stable 8–11 Jan 30, 2025