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:

Supporting organizations: 
supports development and maintenance

Project information

Releases