Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Libraries API 4.2.1 — Minor update available for module libraries (4.2.1). Release: Menu Link Attributes 8.x-1.10 — Minor update available for module menu_link_attributes (8.x-1.10). Release: Menu Link Attributes 8.x-1.9 — Minor update available for module menu_link_attributes (8.x-1.9). Release: Taxonomy Menu 8.x-3.9 — Minor update available for module taxonomy_menu (8.x-3.9). Release: Menu Item Extras 3.2.0 — Minor update available for module menu_item_extras (3.2.0). Release: Layout Paragraphs 2.1.4 — Minor update available for module layout_paragraphs (2.1.4). Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.11 — Minor update available for module photoswipe (5.0.11). Module Revived: Libraries API 4.2.0 — Module libraries updated after 11 months of inactivity (4.2.0). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Upload File History

11 sites No security coverage Drupal 10–11
View on drupal.org

This module provides a way to manage file uploads and replacements, allowing users to maintain a history of files and easily switch between them. It's particularly useful for managing large data files where errors in processing could be risky, as it validates new files before they become active and allows for easy rollbacks to previous versions.

File_history are a form api element (and a file field wigdet in the 2.x branch)

Ok... what else ?

The main feature of file history are permitting to maintain a "memory" or a collection of "non-used" files and provide an easy switch between them.

A use case ?

The main use case of this field are providing data from processing files. A contributor want to expose an amount of data so huge that the "manual contribution" are not a workable solution.
But, such an amount of data, make the upload and replacement of file for processing a little risky.
File_history permit, by the upload validations from file module, a validation of the new file during upload. After upload, and save of form/entity, the new file is only "load" but not activ. The new file become active only after selection. If after all, data aren't corrects, the old file remain on the field. A simple click on "select/unselect" buttons permit the rollback.

Branches

1.x : The legacy One

The form element propose more customisations than the widget.
The "no_upload", "no_use", "no_download" items in one hand and "create_missing" items in the other hand permit you to create a list of non-drupal generated files (like logs of operations). You can manage donwload, delete there files, maintaining a little history of the operations

2.x : CCK compatibility

- A file field widget based on the form API element
- A "test module" (test_file_history) are present with a preconfigured node type and a test form ( /admin/file_history/exemple_form ).
- The cleaning of the "managing file directly in folder" mecanics, now totaly based on core - file API

3.x : Drupal 10/11 ready

That is the 2.x branch port to Drupal 10/11.
Why a new branch ? because some of Drupal service has changed...

More ?

Documentation ?

Read more in the full documentation

1.x to 2.x/3.x migration

The module ensures backwards compatibility.
For this, it is necessary to add an attribute '#legacy' => TRUE, on the "file_history" form element.

 $form['configurations_files'] = [
      '#type' => 'file_history',
       [...]
      '#legacy' => TRUE,
      '#create_missing' => TRUE,

Depends on

Dependencies of the latest stable release

  • file Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2023
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
3.0.2 Stable 10–11 Aug 24, 2026
3.0.1 Stable Apr 12, 2023
3.0.0 Stable Apr 5, 2023